home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / QMATRIX1.ZIP / QBMATRIX.BAS < prev    next >
BASIC Source File  |  1996-09-02  |  84KB  |  3,258 lines

  1. ' File Name     : QBMATRIX.BAS
  2. ' Program Name  : QB Matrix
  3. ' Version       : Ver 1.1
  4. ' Type          : Freeware
  5. ' Developed     : 4/15/93
  6. ' Author        : Timothy Truman, David Pastore
  7. ' Revised       : 7/8/96
  8. '
  9. ' Thanks for downloading QB Matrix !
  10. ' Please read through the text below before starting this program .
  11. '
  12. ' Copyright (c) 1996 Nocturnal Creations
  13. ' All rights reserved
  14. ' The author makes no warrenties about the operation of this program,
  15. ' expressed or implied.
  16. '
  17. ' This program may be freely distributed providing no changes are made
  18. ' to this program or it's support files. This program may not be
  19. ' distributed compiled.
  20. '
  21. ' Original functions and subroutines found in this source code may be used
  22. ' with permision from the author.
  23. '
  24. ' For information on ordering the QuickBASIC 4.5 version with
  25. ' greatly enhanced features read the MATRIX.TXT file.
  26. '
  27. ' Questions, comments or work related:
  28. ' AOL        - Tim Truman
  29. ' Compuserve - 74734,2203
  30. ' INTERNET   - TimTruman@aol.com
  31. '
  32. '  * INSTRUCTIONS *
  33. '
  34. ' Selecting play options :
  35. '-------------------------
  36. '
  37. ' Slam Mode -     Setting slam mode will cause the piece in play
  38. '                 to immediatly drop into position after pressing
  39. '                 the down arrow key or the 2 key. Otherwise the
  40. '                 down arrow key or key 2 on the numeric keypad must
  41. '                 be held to drop the piece. Slam mode is best used
  42. '                 after becomming familiar with the game.
  43. '
  44. ' Sound -         Allows you to turn off the sound effects so you
  45. '                 won't disturb the boss.
  46. '
  47. ' Level -         The higher the selected level the faster the pieces
  48. '                 will drop.
  49. '
  50. ' Handicap -      Selecting a handicap greater than zero will fill the
  51. '                 bottom of the pit with random blocks up to the number
  52. '                 of rows equal to the handicap value selected.
  53. '
  54. ' Play Matrix -   Start the game with the selected options.
  55. '
  56. ' Key usage during option screen:
  57. '      /         - esc
  58. '      8         - move cursor up
  59. '   4  5  6      - move cursor left / press buttons / move cursor right
  60. '      2         - move cursor down
  61. '      Or use the arrow keys and space bar.
  62.  
  63.  
  64. ' How to play :
  65. '--------------
  66. '    Get the falling pieces to fit the best you can within the
  67. '    confines of the pit. When complete rows are formed they will
  68. '    be cleared. This will make room for more pieces. When pieces land
  69. '    on the very top row of the pit the game will be over.
  70. '
  71. '    Key usage during game :
  72. '        /         - esc
  73. '        8         - spin piece ccwise
  74. '     4  5  6      - move piece left / spin piece cwise / move piece right
  75. '        2         - move piece down
  76. '    Ins   Del     - toggle slam mode / toggle sound
  77. '    Or use the arrow keys and space bar.
  78. '
  79. ' Scoring:
  80. '----------
  81. ' Points are awarded every time a piece land in the pit. The points
  82. ' recieved are calculated by the row the piece lands in and the current
  83. ' level. Simply, the higher the piece lands and the higher the level
  84. ' the more points that are added to the score.
  85. '
  86. 'Entering a highscore :
  87. '----------------------
  88. ' QB Matrix keeps the top 15 highscores. If you have beaten one of them
  89. ' a red blinking cursor will appear at your rank and you can enter a name
  90. ' or phrase of up to 23 charaters in length. The keys respond like a reqular
  91. ' text editor. Press enter when done.
  92.  
  93. ' Enjoy The Game!
  94.  
  95.  
  96. DEFINT A-Z
  97.  
  98. TYPE highscores              'type for highscores
  99.   rank AS STRING * 3         'rank
  100.   dat  AS STRING * 8         'date
  101.   nam  AS STRING * 25        'name
  102.   lines  AS STRING * 4       'lines cleared
  103.   num  AS STRING * 6         'Score
  104. END TYPE
  105.  
  106. TYPE hues                    'define the type for hues
  107.   red AS INTEGER             'red component
  108.   grn AS INTEGER             'green component
  109.   blu AS INTEGER             'blue component
  110. END TYPE
  111.  
  112. DECLARE SUB P3x5Num (x, y, num, colour)
  113. DECLARE SUB EndGame ()
  114. DECLARE SUB TileScreen (tile)
  115. DECLARE SUB Button (x, y, opt, size, fill)
  116. DECLARE SUB BlankPal ()
  117. DECLARE SUB CalcRowDiff ()
  118. DECLARE SUB ChangePitPal ()
  119. DECLARE SUB Clearbuffer ()
  120. DECLARE SUB CheckForCleared ()
  121. DECLARE SUB DisplayNextPiece ()
  122. DECLARE SUB DoFillPit ()
  123. DECLARE SUB DrawBlocks ()
  124. DECLARE SUB DrawPlayPiece (x, y, playpiece, piecepostion)
  125. DECLARE SUB DrawPlayScreen ()
  126. DECLARE SUB DropPlayPiece ()
  127. DECLARE SUB DropRows ()
  128. DECLARE SUB Editor (score() AS highscores, cnt)
  129. DECLARE SUB EndToQBasic ()
  130. DECLARE SUB Eraserows ()
  131. DECLARE SUB Findrowdiff ()
  132. DECLARE SUB GameEnd ()
  133. DECLARE SUB GetArea (ax, ay, bx, by, replace)
  134. DECLARE SUB GetHighScores (mode)
  135. DECLARE SUB GetOptions ()
  136. DECLARE SUB MarkCptRows ()
  137. DECLARE SUB PauseGame ()
  138. DECLARE SUB p5x7font (px, y, Message$, colour)
  139. DECLARE SUB RestorePal ()
  140. DECLARE SUB StoreToGrid ()
  141. DECLARE SUB ShowHighScores (score() AS highscores, mode)
  142. DECLARE SUB SoundFX (fx%)
  143. DECLARE SUB sortgridarray ()
  144. DECLARE SUB Stay (Millisecs!)
  145. DECLARE SUB TitleScreen ()
  146. DECLARE SUB Updatescore ()
  147. DECLARE SUB UpdatePieceMeter (restart)
  148.  
  149. DECLARE FUNCTION CheckMove (mode)
  150. DECLARE FUNCTION CheckRotate ()
  151. DECLARE FUNCTION Colorvalue& (attribute)
  152. DECLARE FUNCTION GetPiece ()
  153. DECLARE FUNCTION InputText$ (x, y, length)
  154. DECLARE FUNCTION TimeToDrop ()
  155. DECLARE FUNCTION ReturnEvent ()
  156.  
  157. COMMON SHARED grid(), blocks(), masks(), font(), smallnum(), meterpieces()
  158. COMMON SHARED completerows()
  159. COMMON SHARED xpiece, ypiece, pieceorientation, playpiece, piecelanded
  160. COMMON SHARED gamescore&, oldhigh$, sngle, duble, triple, matrix
  161. COMMON SHARED levelnum, droptime!, linescleared, levelmark, nextlevelmark
  162. COMMON SHARED handicap, soundmode, slammode, gameover, Xpit, Ypit
  163.  
  164. 'mapped key values
  165. CONST F1 = -59
  166. CONST F2 = -60
  167. CONST F3 = -61
  168. CONST up = -72
  169. CONST left = -75
  170. CONST right = -77
  171. CONST down = -80
  172. CONST Insert = -82
  173. CONST backspace = 8
  174. CONST enter = 13
  175. CONST Esc = 27
  176. CONST space = 32
  177. CONST Plus = 43
  178. CONST Minus = 45
  179. CONST Zero = 48
  180. CONST Dot = 46
  181. CONST Slash = 47
  182. CONST two = 50
  183. CONST Four = 52
  184. CONST five = 53
  185. CONST Six = 54
  186. CONST Eight = 56
  187.  
  188. 'other
  189. CONST True = 1
  190. CONST false = 0
  191. CONST blockheight = 7
  192. CONST blockwidth = 11
  193. CONST drop = 1
  194.  
  195.  
  196. OUT &H60, &HF3                        'inform keyboard port
  197. FOR d& = 1 TO 800: NEXT               'let hardware settle
  198. OUT &H60, 0                           'send fast typematic rate
  199.  
  200. DEF fnrnd (num) = INT(RND * num) + 1  'function for random number generation
  201. RANDOMIZE TIMER                       'seed the random number generator
  202.  
  203. SCREEN 13                             'set video
  204.  
  205. LOCATE 10, 15: COLOR 7
  206. PRINT "Please Wait."                  'next few routines take some time
  207.  
  208. DIM completerows(1 TO 4)              'DIM array to hold completed rows
  209.  
  210. DIM grid(0 TO 22, 0 TO 12)            'DIM array for play pit
  211.  
  212. FOR y = 0 TO 22                       'to contain moves
  213.   grid(y, 0) = 1
  214. NEXT
  215. FOR y = 0 TO 22                       'ditto
  216.   grid(y, 11) = 1
  217. NEXT
  218. FOR x = 0 TO 11                       'ditto
  219.  grid(22, x) = 1
  220. NEXT
  221.  
  222. DIM smallnum(9, 5, 3)                    'DIM array for small numbers
  223. FOR offset = 0 TO 9                      'first to last
  224.   FOR ypos = 1 TO 5                      'top to bottom
  225.     FOR xpos = 1 TO 3                    'left to right
  226.       READ dat                           'READ data
  227.       smallnum(offset, ypos, xpos) = dat 'store the data
  228.     NEXT
  229.   NEXT
  230. NEXT
  231.  
  232.  
  233. DIM masks(27, 3, 3)                       'DIM array for masks
  234. FOR offset = 0 TO 27                      'first to last
  235.   FOR bity = 0 TO 3                       'top to bottom
  236.     FOR bitx = 0 TO 3                     'left to right
  237.       READ dat                            'get data
  238.       masks(offset, bity, bitx) = dat     'store to array
  239.     NEXT
  240.   NEXT
  241. NEXT
  242.  
  243. DIM meterpieces(6, 20, 8)                  'DIM array for meter pieces
  244. FOR offset = 0 TO 6                        'first to last
  245.   FOR y = 1 TO 8                           'top to bottom
  246.     FOR x = 1 TO 20                        'left to right
  247.      READ dat                              'READ data
  248.       meterpieces(offset, x, y) = dat      'store to array
  249.     NEXT
  250.   NEXT
  251. NEXT
  252.  
  253. DIM font(127, 4, 6)                       'DIM array for fonts
  254. FOR offset = 0 TO 127                     'read in fonts
  255.  FOR y = 0 TO 6                           'top to bottom
  256.   FOR x = 0 TO 4                          'left to right
  257.      READ dat                             'get data
  258.      font(offset, x, y) = dat             'store it
  259.   NEXT
  260.  NEXT
  261. NEXT
  262.  
  263. OPEN "QBMATRIX.OPT" FOR BINARY AS #1            'check for existance of .opt
  264. length = LOF(1)
  265. CLOSE #1
  266. IF length = 0 THEN                              'file did not exist
  267.  OPEN "QBMATRIX.OPT" FOR OUTPUT AS #1           'create file with defaults
  268.  levelnum = 0: handicap = 0: slammode = 0: soundmode = 1
  269.  WRITE #1, levelnum, handicap, slammode, soundmode
  270.  CLOSE #1
  271. ELSE                                            'file exists
  272.  OPEN "QBMATRIX.OPT" FOR INPUT AS #1            'load saved options
  273.  INPUT #1, levelnum, handicap, slammode, soundmode
  274.  CLOSE #1
  275. END IF
  276.  
  277. Stay (1)                   'initilaize delay routine
  278. BlankPal                   'hide the screen writes
  279. DrawBlocks                 'makes blocks used to make play pieces
  280. CLS                        'clear screen
  281. RestorePal                 'restore pallete
  282. TitleScreen                'draw intro screen
  283. CLS                        'clear screen
  284.  
  285. droptime! = .5             'initialize drop speed
  286. GetOptions
  287. Xpit = 11                  'set start position
  288. Ypit = 35                  'ditto
  289. 'levelnum = 0              'initialize level
  290. 'handicap = 0              'initialize handicap
  291. levelmark = 30             'initialize level occurance
  292. nextlevelmark = levelmark  'set
  293. ChangePitPal               'initialize pit color
  294. DrawPlayScreen             'initilaize play screen
  295. UpdatePieceMeter (-1)      'initialize meter
  296. playpiece = GetPiece       'initialize playpiece
  297. xpiece = Xpit * 6          'ditto
  298. ypiece = Ypit              'ditto
  299. DoFillPit                  'in case of handicap
  300. DrawPlayPiece xpiece, ypiece, playpiece, pieceorientation  ' ditto
  301.  
  302. DO                                                   'main loop
  303.     
  304.    event = ReturnEvent                              'get event
  305.     
  306.    IF TimeToDrop THEN event = drop
  307.  
  308.    SELECT CASE event                                'process event
  309.    CASE Esc, Slash, Minus: EndToQBasic              'user wants out
  310.    CASE Plus:  PauseGame                            'nature calling ?
  311.    CASE up, Eight, space, five                                   'do rotate
  312.      rempiece = pieceorientation                                 'to restore
  313.      pieceorientation = (pieceorientation + 1) MOD 4             'adjust
  314.      IF CheckRotate THEN                                         'ok ?
  315.        DrawPlayPiece xpiece, ypiece, playpiece, rempiece         'remove
  316.        DrawPlayPiece xpiece, ypiece, playpiece, pieceorientation 'draw new
  317.      ELSE                                                        'not ok
  318.        pieceorientation = rempiece                               'restore
  319.      END IF
  320.  
  321.    CASE left, Four                                               'do left
  322.      IF CheckMove(left) THEN                                     'ok ?
  323.        DrawPlayPiece xpiece, ypiece, playpiece, pieceorientation 'remove
  324.        xpiece = xpiece - blockwidth                              'adjust
  325.        DrawPlayPiece xpiece, ypiece, playpiece, pieceorientation 'draw new
  326.      END IF
  327.  
  328.    CASE right, Six                                               'do right
  329.      IF CheckMove(right) THEN                                    'ok?
  330.        DrawPlayPiece xpiece, ypiece, playpiece, pieceorientation  'remove
  331.        xpiece = xpiece + blockwidth                               'adjust
  332.        DrawPlayPiece xpiece, ypiece, playpiece, pieceorientation  'draw new
  333.      END IF
  334.  
  335.    CASE drop
  336.      IF CheckMove(down) THEN                                     'ok ?
  337.        DrawPlayPiece xpiece, ypiece, playpiece, pieceorientation 'remove
  338.        ypiece = ypiece + blockheight                             'adjust
  339.        DrawPlayPiece xpiece, ypiece, playpiece, pieceorientation 'draw new
  340.      ELSE                                                        'not ok ?
  341.       IF ypiece <= Ypit + blockheight THEN                       'at top ?
  342.     gameover = True                                          'set flag
  343.     EndGame                                                  'end game
  344.       END IF                                                     'otherwise
  345.       piecelanded = True                              'change piece color
  346.       DrawPlayPiece xpiece, ypiece, playpiece, pieceorientation  ' ditto
  347.       piecelanded = false                           'did it
  348.       CheckForCleared
  349.       Updatescore                                   'taly score
  350.       xpiece = Xpit * 6                             'reset
  351.       ypiece = Ypit                                 'ditto
  352.       pieceorientation = 0                          'reset
  353.       playpiece = GetPiece                          'get new
  354.       DrawPlayPiece xpiece, ypiece, playpiece, pieceorientation 'draw
  355.     END IF
  356.         
  357.     CASE down, two                                               'do down
  358.       DO
  359.     IF CheckMove(down) THEN                                     'ok ?
  360.       DrawPlayPiece xpiece, ypiece, playpiece, pieceorientation  'remove
  361.       ypiece = ypiece + blockheight                              'adjust
  362.       DrawPlayPiece xpiece, ypiece, playpiece, pieceorientation  'draw new
  363.     ELSE                                                        'not ok ?
  364.      IF ypiece <= Ypit + blockheight THEN                       'at top ?
  365.        gameover = True                                          'set flag
  366.        EndGame                                                  'end game
  367.      END IF                                                     'otherwise
  368.      piecelanded = True                              'change piece color
  369.      DrawPlayPiece xpiece, ypiece, playpiece, pieceorientation  'ditto
  370.      piecelanded = false                           'did it
  371.      CheckForCleared
  372.      Updatescore                                   'taly score
  373.      xpiece = Xpit * 6                             'reset
  374.      ypiece = Ypit                                 'ditto
  375.      pieceorientation = 0                          'reset
  376.      playpiece = GetPiece                          'get new
  377.      DrawPlayPiece xpiece, ypiece, playpiece, pieceorientation 'draw
  378.      EXIT DO
  379.     END IF
  380.       LOOP WHILE slammode
  381.  
  382.     CASE Dot
  383.       soundmode = NOT soundmode                     'toggle sound mode
  384.       LINE (274, 75)-(294, 85), 17, BF              'clear old text
  385.       IF soundmode THEN                             'print new
  386.     p5x7font 274, 75, "On", 81                  'ditto
  387.       ELSE                                          'ditto
  388.     p5x7font 274, 75, "Off", 80                 'ditto
  389.       END IF
  390.  
  391.     CASE Insert, Zero                                'do insert
  392.       IF slammode THEN                               'slammode on
  393.     slammode = NOT slammode                      'change it
  394.     LINE (274, 62)-(294, 70), 17, BF             'clear old
  395.     p5x7font 274, 62, "Off", 7                   'report
  396.       ELSE                                           'slammode off
  397.     slammode = NOT slammode                      'change it
  398.     LINE (274, 62)-(294, 70), 17, BF             'clear old
  399.     p5x7font 274, 62, "On", 15                   'report
  400.       END IF
  401.          
  402.     END SELECT
  403.  
  404. LOOP
  405.  
  406.  
  407.  
  408. 'Small Numbers
  409.  
  410. DATA  1,1,1
  411. DATA  1,0,1
  412. DATA  1,0,1
  413. DATA  1,0,1
  414. DATA  1,1,1
  415.  
  416. DATA  0,1,0
  417. DATA  0,1,0
  418. DATA  0,1,0
  419. DATA  0,1,0
  420. DATA  0,1,0
  421.  
  422. DATA  1,1,1
  423. DATA  0,0,1
  424. DATA  1,1,1
  425. DATA  1,0,0
  426. DATA  1,1,1
  427.  
  428. DATA  1,1,1
  429. DATA  0,0,1
  430. DATA  0,1,1
  431. DATA  0,0,1
  432. DATA  1,1,1
  433.  
  434. DATA  1,0,1
  435. DATA  1,0,1
  436. DATA  1,1,1
  437. DATA  0,0,1
  438. DATA  0,0,1
  439.  
  440. DATA  1,1,1
  441. DATA  1,0,0
  442. DATA  1,1,1
  443. DATA  0,0,1
  444. DATA  1,1,1
  445.  
  446. DATA  1,0,0
  447. DATA  1,0,0
  448. DATA  1,1,1
  449. DATA  1,0,1
  450. DATA  1,1,1
  451.  
  452. DATA  1,1,1
  453. DATA  0,0,1
  454. DATA  0,0,1
  455. DATA  0,0,1
  456. DATA  0,0,1
  457.  
  458. DATA  1,1,1
  459. DATA  1,0,1
  460. DATA  1,1,1
  461. DATA  1,0,1
  462. DATA  1,1,1
  463.  
  464. DATA  1,1,1
  465. DATA  1,0,1
  466. DATA  1,1,1
  467. DATA  0,0,1
  468. DATA  0,0,1
  469.  
  470.  
  471.  
  472. 'Data For Masks
  473.  
  474. 'playpiece 0
  475. DATA 1,1,1,1
  476. DATA 0,0,0,0
  477. DATA 0,0,0,0
  478. DATA 0,0,0,0
  479.  
  480. DATA 0,1,0,0
  481. DATA 0,1,0,0
  482. DATA 0,1,0,0
  483. DATA 0,1,0,0
  484.  
  485. DATA 1,1,1,1
  486. DATA 0,0,0,0
  487. DATA 0,0,0,0
  488. DATA 0,0,0,0
  489.  
  490. DATA 0,1,0,0
  491. DATA 0,1,0,0
  492. DATA 0,1,0,0
  493. DATA 0,1,0,0
  494.      
  495.                 'playpiece 1
  496. DATA 1,1,1,0
  497. DATA 0,1,0,0
  498. DATA 0,0,0,0
  499. DATA 0,0,0,0
  500.  
  501. DATA 0,1,0,0
  502. DATA 1,1,0,0
  503. DATA 0,1,0,0
  504. DATA 0,0,0,0
  505.  
  506. DATA 0,1,0,0
  507. DATA 1,1,1,0
  508. DATA 0,0,0,0
  509. DATA 0,0,0,0
  510.  
  511. DATA 1,0,0,0
  512. DATA 1,1,0,0
  513. DATA 1,0,0,0
  514. DATA 0,0,0,0
  515.              'playpiece 2
  516. DATA 1,1,0,0
  517. DATA 1,1,0,0
  518. DATA 0,0,0,0
  519. DATA 0,0,0,0
  520.  
  521. DATA 1,1,0,0
  522. DATA 1,1,0,0
  523. DATA 0,0,0,0
  524. DATA 0,0,0,0
  525.  
  526. DATA 1,1,0,0
  527. DATA 1,1,0,0
  528. DATA 0,0,0,0
  529. DATA 0,0,0,0
  530.  
  531. DATA 1,1,0,0
  532. DATA 1,1,0,0
  533. DATA 0,0,0,0
  534. DATA 0,0,0,0
  535.  
  536.                 'playpiece 3
  537. DATA 1,1,1,0
  538. DATA 0,0,1,0
  539. DATA 0,0,0,0
  540. DATA 0,0,0,0
  541.  
  542. DATA 0,1,0,0
  543. DATA 0,1,0,0
  544. DATA 1,1,0,0
  545. DATA 0,0,0,0
  546.  
  547. DATA 1,0,0,0
  548. DATA 1,1,1,0
  549. DATA 0,0,0,0
  550. DATA 0,0,0,0
  551.  
  552. DATA 1,1,0,0
  553. DATA 1,0,0,0
  554. DATA 1,0,0,0
  555. DATA 0,0,0,0
  556.              'playpiece 4
  557.  
  558. DATA 1,1,1,0
  559. DATA 1,0,0,0
  560. DATA 0,0,0,0
  561. DATA 0,0,0,0
  562.  
  563. DATA 1,1,0,0
  564. DATA 0,1,0,0
  565. DATA 0,1,0,0
  566. DATA 0,0,0,0
  567.  
  568. DATA 0,0,1,0
  569. DATA 1,1,1,0
  570. DATA 0,0,0,0
  571. DATA 0,0,0,0
  572.  
  573. DATA 1,0,0,0
  574. DATA 1,0,0,0
  575. DATA 1,1,0,0
  576. DATA 0,0,0,0
  577.  
  578.                 'playpiece 5
  579. DATA 0,1,1,0
  580. DATA 1,1,0,0
  581. DATA 0,0,0,0
  582. DATA 0,0,0,0
  583.  
  584. DATA 1,0,0,0
  585. DATA 1,1,0,0
  586. DATA 0,1,0,0
  587. DATA 0,0,0,0
  588.  
  589. DATA 0,1,1,0
  590. DATA 1,1,0,0
  591. DATA 0,0,0,0
  592. DATA 0,0,0,0
  593.  
  594. DATA 1,0,0,0
  595. DATA 1,1,0,0
  596. DATA 0,1,0,0
  597. DATA 0,0,0,0
  598.              'playpiece 6
  599.  
  600. DATA 1,1,0,0
  601. DATA 0,1,1,0
  602. DATA 0,0,0,0
  603. DATA 0,0,0,0
  604.  
  605. DATA 0,1,0,0
  606. DATA 1,1,0,0
  607. DATA 1,0,0,0
  608. DATA 0,0,0,0
  609.  
  610. DATA 1,1,0,0
  611. DATA 0,1,1,0
  612. DATA 0,0,0,0
  613. DATA 0,0,0,0
  614.  
  615. DATA 0,1,0,0
  616. DATA 1,1,0,0
  617. DATA 1,0,0,0
  618. DATA 0,0,0,0
  619.  
  620.  
  621. 'bitmaps for random meters
  622. DATA 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  623. DATA 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  624. DATA 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7
  625. DATA 4,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7
  626. DATA 4,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7
  627. DATA 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,7
  628. DATA 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  629. DATA 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  630.  
  631.  
  632. DATA 0,0,0,0,0,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39
  633. DATA 0,0,0,0,0,34,36,36,36,36,36,36,36,36,36,36,36,36,36,39
  634. DATA 0,0,0,0,0,34,36,36,36,36,36,36,36,36,36,36,36,36,36,39
  635. DATA 0,0,0,0,0,34,34,34,34,34,34,36,36,36,34,34,34,34,34,39
  636. DATA 0,0,0,0,0,0 ,0 ,0 ,0 ,0 ,34,36,36,36,39,0 ,0 ,0 ,0 ,0
  637. DATA 0,0,0,0,0,0 ,0 ,0 ,0 ,0 ,34,36,36,36,39,0 ,0 ,0 ,0 ,0
  638. DATA 0,0,0,0,0,0 ,0 ,0 ,0 ,0 ,34,36,36,36,39,0 ,0 ,0 ,0 ,0
  639. DATA 0,0,0,0,0,0 ,0 ,0 ,0 ,0 ,34,34,34,34,39,0 ,0 ,0 ,0 ,0
  640.  
  641. DATA 0,0,0,0,0,0,0,0,0,0,127,127,127,127,127,127,127,127,127,127
  642. DATA 0,0,0,0,0,0,0,0,0,0,122,125,125,125,125,125,125,125,125,127
  643. DATA 0,0,0,0,0,0,0,0,0,0,122,125,125,125,125,125,125,125,125,127
  644. DATA 0,0,0,0,0,0,0,0,0,0,122,125,125,125,125,125,125,125,125,127
  645. DATA 0,0,0,0,0,0,0,0,0,0,122,125,125,125,125,125,125,125,125,127
  646. DATA 0,0,0,0,0,0,0,0,0,0,122,125,125,125,125,125,125,125,125,127
  647. DATA 0,0,0,0,0,0,0,0,0,0,122,125,125,125,125,125,125,125,125,127
  648. DATA 0,0,0,0,0,0,0,0,0,0,122,122,122,122,122,122,122,122,122,127
  649.  
  650. DATA 0,0,0,0,0,15,15,15,15,15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
  651. DATA 0,0,0,0,0,12,14,14,14,15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
  652. DATA 0,0,0,0,0,12,14,14,14,15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
  653. DATA 0,0,0,0,0,12,14,14,14,15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
  654. DATA 0,0,0,0,0,12,14,14,14,15,15,15,15,15,15,15,15,15,15,15
  655. DATA 0,0,0,0,0,12,14,14,14,14,14,14,14,14,14,14,14,14,14,15
  656. DATA 0,0,0,0,0,12,14,14,14,14,14,14,14,14,14,14,14,14,14,15
  657. DATA 0,0,0,0,0,12,12,12,12,12,12,12,12,12,12,12,12,12,12,15
  658.  
  659. DATA 0,0,0,0,0,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30
  660. DATA 0,0,0,0,0,25,28,28,28,28,28,28,28,28,28,28,28,28,28,30
  661. DATA 0,0,0,0,0,25,28,28,28,28,28,28,28,28,28,28,28,28,28,30
  662. DATA 0,0,0,0,0,25,28,28,28,25,25,25,25,25,25,25,25,25,25,25
  663. DATA 0,0,0,0,0,25,28,28,28,30,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0
  664. DATA 0,0,0,0,0,25,28,28,28,30,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0
  665. DATA 0,0,0,0,0,25,28,28,28,30,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0
  666. DATA 0,0,0,0,0,25,25,25,25,30,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0
  667.  
  668. DATA 0,0,0,0,0,  0,  0,  0,  0,  0,103,103,103,103,103,103,103,103,103,103
  669. DATA 0,0,0,0,0,  0,  0,  0,  0,  0,100,102,102,102,102,102,102,102,102,103
  670. DATA 0,0,0,0,0,  0,  0,  0,  0,  0,100,102,102,102,102,102,102,102,102,103
  671. DATA 0,0,0,0,0,  0,  0,  0,  0,  0,100,102,102,102,100,100,100,100,100,103
  672. DATA 0,0,0,0,0,103,103,103,103,103,100,102,102,102,103,  0,  0,  0,  0,  0
  673. DATA 0,0,0,0,0,100,102,102,102,102,102,102,102,102,103,  0,  0,  0,  0,  0
  674. DATA 0,0,0,0,0,100,102,102,102,102,102,102,102,102,103,  0,  0,  0,  0,  0
  675. DATA 0,0,0,0,0,100,100,100,100,100,100,100,100,100,103,  0,  0,  0,  0,  0
  676.  
  677. DATA 0,0,0,0,0,48,48,48,48,48,48,48,48,48,48, 0, 0, 0, 0, 0
  678. DATA 0,0,0,0,0,43,45,45,45,45,45,45,45,45,48, 0, 0, 0, 0, 0
  679. DATA 0,0,0,0,0,43,45,45,45,45,45,45,45,45,48, 0, 0, 0, 0, 0
  680. DATA 0,0,0,0,0,43,43,43,43,43,43,45,45,45,48, 0, 0, 0, 0, 0
  681. DATA 0,0,0,0,0, 0, 0, 0, 0, 0,43,45,45,45,48,48,48,48,48,48
  682. DATA 0,0,0,0,0, 0, 0, 0, 0, 0,43,45,45,45,45,45,45,45,45,48
  683. DATA 0,0,0,0,0, 0, 0, 0, 0, 0,43,45,45,45,45,45,45,45,45,48
  684. DATA 0,0,0,0,0, 0, 0, 0, 0, 0,43,43,43,43,43,43,43,43,43,48
  685.  
  686.  
  687.  
  688. 'font bitmaps, duplicates first 128 charactors of ASCII set
  689. ' 0 NUL
  690. DATA 0,0,0,0,0
  691. DATA 0,0,0,0,0
  692. DATA 0,0,0,0,0
  693. DATA 0,0,0,0,0
  694. DATA 0,0,0,0,0
  695. DATA 0,0,0,0,0
  696. DATA 0,0,0,0,0
  697. ' 1
  698. DATA 1,1,0,1,1
  699. DATA 1,1,0,1,1
  700. DATA 0,1,0,1,0
  701. DATA 0,0,0,0,0
  702. DATA 1,0,0,0,1
  703. DATA 1,0,0,0,1
  704. DATA 1,1,1,1,1
  705. ' 2
  706. DATA 1,1,1,1,1
  707. DATA 1,0,1,0,1
  708. DATA 1,0,1,0,1
  709. DATA 1,1,1,1,1
  710. DATA 1,0,1,0,1
  711. DATA 1,0,0,0,1
  712. DATA 1,1,1,1,1
  713. ' 3
  714. DATA 0,0,0,0,0
  715. DATA 0,1,0,1,0
  716. DATA 1,1,1,1,1
  717. DATA 1,1,1,1,1
  718. DATA 0,1,1,1,0
  719. DATA 0,0,1,0,0
  720. DATA 0,0,0,0,0
  721. '4
  722. DATA 0,0,0,0,0
  723. DATA 0,0,1,0,0
  724. DATA 0,1,1,1,0
  725. DATA 1,1,1,1,1
  726. DATA 1,1,1,1,1
  727. DATA 0,1,1,1,0
  728. DATA 0,0,1,0,0
  729. '5
  730. DATA 0,1,1,1,0
  731. DATA 0,1,1,1,0
  732. DATA 1,1,1,1,1
  733. DATA 1,1,1,1,1
  734. DATA 1,1,1,1,1
  735. DATA 0,0,1,0,0
  736. DATA 0,0,1,0,0
  737. '6
  738. DATA 0,0,1,0,0
  739. DATA 0,1,1,1,0
  740. DATA 1,1,1,1,1
  741. DATA 1,1,0,1,1
  742. DATA 0,0,1,0,0
  743. DATA 0,0,1,0,0
  744. DATA 0,0,0,0,0
  745. '7
  746. DATA 0,0,0,0,0
  747. DATA 0,0,1,0,0
  748. DATA 0,1,1,1,0
  749. DATA 0,1,1,1,0
  750. DATA 1,1,1,1,1
  751. DATA 1,1,1,1,1
  752. DATA 0,0,0,1,0
  753. '8
  754. DATA 1,1,1,1,1
  755. DATA 1,1,0,1,1
  756. DATA 1,0,0,0,1
  757. DATA 1,0,0,0,1
  758. DATA 0,0,0,0,0
  759. DATA 0,0,0,0,0
  760. DATA 1,1,1,0,1
  761. '9
  762. DATA 0,0,0,0,0
  763. DATA 0,1,1,1,0
  764. DATA 1,0,0,0,1
  765. DATA 1,0,0,0,1
  766. DATA 1,0,0,0,1
  767. DATA 0,1,1,1,0
  768. DATA 0,0,0,0,0
  769. '10
  770. DATA 1,1,1,1,1
  771. DATA 1,0,0,0,1
  772. DATA 0,1,1,1,0
  773. DATA 0,1,1,1,0
  774. DATA 0,1,1,1,0
  775. DATA 1,0,0,0,1
  776. DATA 1,1,1,1,1
  777. '11
  778. DATA 0,0,1,1,1
  779. DATA 0,0,0,1,1
  780. DATA 0,0,1,0,1
  781. DATA 0,1,1,0,0
  782. DATA 1,0,0,1,0
  783. DATA 1,0,0,1,0
  784. DATA 0,1,1,0,0
  785. '12
  786. DATA 0,1,1,1,0
  787. DATA 1,0,0,0,1
  788. DATA 1,0,0,0,1
  789. DATA 0,1,1,1,0
  790. DATA 0,0,1,0,0
  791. DATA 0,1,1,1,0
  792. DATA 0,0,1,0,0
  793. '13
  794. DATA 0,0,1,1,1
  795. DATA 0,0,1,0,0
  796. DATA 0,0,1,1,0
  797. DATA 0,0,1,0,0
  798. DATA 1,1,1,0,0
  799. DATA 1,1,1,0,0
  800. DATA 1,1,1,0,0
  801. '14
  802. DATA 1,1,1,1,1
  803. DATA 1,0,0,0,1
  804. DATA 1,1,1,1,1
  805. DATA 0,1,0,0,1
  806. DATA 1,1,0,0,1
  807. DATA 1,1,0,1,1
  808. DATA 0,0,0,1,1
  809. '15
  810. DATA 1,0,1,0,1
  811. DATA 0,1,1,1,0
  812. DATA 0,1,0,1,0
  813. DATA 1,1,0,1,1
  814. DATA 0,1,0,1,0
  815. DATA 0,1,1,1,0
  816. DATA 1,0,1,0,1
  817. '16
  818. DATA 1,1,0,0,0
  819. DATA 1,1,1,0,0
  820. DATA 1,1,1,1,0
  821. DATA 1,1,1,1,1
  822. DATA 1,1,1,1,0
  823. DATA 1,1,1,0,0
  824. DATA 1,1,0,0,0
  825. '17
  826. DATA 0,0,0,1,1
  827. DATA 0,0,1,1,1
  828. DATA 0,1,1,1,1
  829. DATA 1,1,1,1,1
  830. DATA 0,1,1,1,1
  831. DATA 0,0,1,1,1
  832. DATA 0,0,0,1,1
  833. '18
  834. DATA 0,0,1,0,0
  835. DATA 0,1,1,1,0
  836. DATA 0,0,1,0,0
  837. DATA 0,0,1,0,0
  838. DATA 0,1,1,1,0
  839. DATA 0,1,1,1,0
  840. DATA 0,0,1,0,0
  841. '19
  842. DATA 1,1,0,1,1
  843. DATA 1,1,0,1,1
  844. DATA 1,1,0,1,1
  845. DATA 1,1,0,1,1
  846. DATA 1,1,0,1,1
  847. DATA 0,0,0,0,0
  848. DATA 1,1,0,1,1
  849. '20
  850. DATA 1,1,1,1,1
  851. DATA 1,1,0,1,0
  852. DATA 1,1,0,1,0
  853. DATA 0,1,0,1,0
  854. DATA 0,1,0,1,0
  855. DATA 0,1,0,1,0
  856. DATA 0,1,0,1,0
  857. '21
  858. DATA 0,0,1,1,0
  859. DATA 0,1,0,0,1
  860. DATA 0,0,1,0,0
  861. DATA 0,0,0,1,0
  862. DATA 0,0,0,0,1
  863. DATA 0,0,0,0,1
  864. DATA 1,1,1,1,0
  865. '22
  866. DATA 0,0,0,0,0
  867. DATA 0,0,0,0,0
  868. DATA 0,0,0,0,0
  869. DATA 0,0,0,0,0
  870. DATA 0,0,0,0,0
  871. DATA 1,1,1,1,1
  872. DATA 1,1,1,1,1
  873. '23
  874. DATA 0,0,1,0,0
  875. DATA 0,1,1,1,0
  876. DATA 0,0,1,0,0
  877. DATA 0,0,1,0,0
  878. DATA 0,1,1,1,0
  879. DATA 0,0,1,0,0
  880. DATA 1,1,1,1,1
  881. '24
  882. DATA 0,0,1,0,0
  883. DATA 0,1,1,1,0
  884. DATA 1,1,1,1,1
  885. DATA 0,0,1,0,0
  886. DATA 0,0,1,0,0
  887. DATA 0,0,1,0,0
  888. DATA 0,0,1,0,0
  889. '25
  890. DATA 0,0,1,0,0
  891. DATA 0,0,1,0,0
  892. DATA 0,0,1,0,0
  893. DATA 0,0,1,0,0
  894. DATA 1,1,1,1,1
  895. DATA 0,1,1,1,0
  896. DATA 0,0,1,0,0
  897. '26
  898. DATA 0,0,0,0,0
  899. DATA 0,0,1,0,0
  900. DATA 0,0,1,1,0
  901. DATA 1,1,1,1,1
  902. DATA 0,0,1,1,0
  903. DATA 0,0,1,0,0
  904. DATA 0,0,0,0,0
  905. '27
  906. DATA 0,0,0,0,0
  907. DATA 0,0,1,0,0
  908. DATA 0,1,1,0,0
  909. DATA 1,1,1,1,1
  910. DATA 0,1,1,0,0
  911. DATA 0,0,1,0,0
  912. DATA 0,0,0,0,0
  913. '28
  914. DATA 0,0,0,0,0
  915. DATA 0,0,0,0,0
  916. DATA 1,0,0,0,0
  917. DATA 1,1,1,1,1
  918. DATA 0,0,0,0,0
  919. DATA 0,0,0,0,0
  920. DATA 0,0,0,0,0
  921. '29
  922. DATA 0,0,0,0,0
  923. DATA 0,0,0,0,0
  924. DATA 0,1,0,1,0
  925. DATA 1,1,1,1,1
  926. DATA 0,1,0,1,0
  927. DATA 0,0,0,0,0
  928. DATA 0,0,0,0,0
  929. '30
  930. DATA 0,0,0,0,0
  931. DATA 0,0,0,0,0
  932. DATA 0,0,0,0,0
  933. DATA 0,0,0,0,0
  934. DATA 0,0,1,0,0
  935. DATA 0,1,1,1,0
  936. DATA 1,1,1,1,1
  937. '31
  938. DATA 0,0,0,0,0
  939. DATA 0,0,0,0,0
  940. DATA 0,0,0,0,0
  941. DATA 0,0,0,0,0
  942. DATA 1,1,1,1,1
  943. DATA 0,1,1,1,0
  944. DATA 0,0,1,0,0
  945. '32
  946. DATA 0,0,0,0,0
  947. DATA 0,0,0,0,0
  948. DATA 0,0,0,0,0
  949. DATA 0,0,0,0,0
  950. DATA 0,0,0,0,0
  951. DATA 0,0,0,0,0
  952. DATA 0,0,0,0,0
  953. '33
  954. DATA 1,0,0,0,0
  955. DATA 1,0,0,0,0
  956. DATA 1,0,0,0,0
  957. DATA 1,0,0,0,0
  958. DATA 1,0,0,0,0
  959. DATA 0,0,0,0,0
  960. DATA 1,0,0,0,0
  961. '34
  962. DATA 0,1,0,1,0
  963. DATA 0,1,0,1,0
  964. DATA 0,0,0,0,0
  965. DATA 0,0,0,0,0
  966. DATA 0,0,0,0,0
  967. DATA 0,0,0,0,0
  968. DATA 0,0,0,0,0
  969. '35
  970. DATA 0,1,0,1,0
  971. DATA 0,1,0,1,0
  972. DATA 1,1,1,1,1
  973. DATA 0,1,0,1,0
  974. DATA 1,1,1,1,1
  975. DATA 0,1,0,1,0
  976. DATA 0,1,0,1,0
  977. '36
  978. DATA 0,0,1,0,0
  979. DATA 1,1,1,1,1
  980. DATA 1,0,0,0,0
  981. DATA 1,1,1,1,1
  982. DATA 0,0,0,0,1
  983. DATA 1,1,1,1,1
  984. DATA 0,0,1,0,0
  985. '37
  986. DATA 1,1,0,0,0
  987. DATA 1,1,0,0,1
  988. DATA 0,0,0,1,0
  989. DATA 0,0,1,0,0
  990. DATA 0,1,0,0,0
  991. DATA 1,0,0,1,1
  992. DATA 0,0,0,1,1
  993. '38
  994. DATA 0,1,1,0,0
  995. DATA 1,0,0,0,0
  996. DATA 1,0,0,0,0
  997. DATA 0,1,0,0,0
  998. DATA 1,0,1,1,0
  999. DATA 1,0,1,1,0
  1000. DATA 0,1,0,0,1
  1001. '39
  1002. DATA 0,1,0,0,0
  1003. DATA 1,0,0,0,0
  1004. DATA 0,0,0,0,0
  1005. DATA 0,0,0,0,0
  1006. DATA 0,0,0,0,0
  1007. DATA 0,0,0,0,0
  1008. DATA 0,0,0,0,0
  1009. '40
  1010. DATA 0,1,0,0,0
  1011. DATA 1,0,0,0,0
  1012. DATA 1,0,0,0,0
  1013. DATA 1,0,0,0,0
  1014. DATA 1,0,0,0,0
  1015. DATA 1,0,0,0,0
  1016. DATA 0,1,0,0,0
  1017. '41
  1018. DATA 1,0,0,0,0
  1019. DATA 0,1,0,0,0
  1020. DATA 0,1,0,0,0
  1021. DATA 0,1,0,0,0
  1022. DATA 0,1,0,0,0
  1023. DATA 0,1,0,0,0
  1024. DATA 1,0,0,0,0
  1025. '42
  1026. DATA 0,0,0,0,0
  1027. DATA 1,0,1,0,1
  1028. DATA 0,1,1,1,0
  1029. DATA 1,1,1,1,1
  1030. DATA 0,1,1,1,0
  1031. DATA 1,0,1,0,1
  1032. DATA 0,0,0,0,0
  1033. '43
  1034. DATA 0,0,0,0,0
  1035. DATA 0,0,0,0,0
  1036. DATA 0,0,1,0,0
  1037. DATA 0,1,1,1,0
  1038. DATA 0,0,1,0,0
  1039. DATA 0,0,0,0,0
  1040. DATA 0,0,0,0,0
  1041. '44
  1042. DATA 0,0,0,0,0
  1043. DATA 0,0,0,0,0
  1044. DATA 0,0,0,0,0
  1045. DATA 0,0,0,0,0
  1046. DATA 0,0,0,0,0
  1047. DATA 0,1,0,0,0
  1048. DATA 1,0,0,0,0
  1049. '45
  1050. DATA 0,0,0,0,0
  1051. DATA 0,0,0,0,0
  1052. DATA 0,0,0,0,0
  1053. DATA 0,1,1,1,0
  1054. DATA 0,0,0,0,0
  1055. DATA 0,0,0,0,0
  1056. DATA 0,0,0,0,0
  1057. '46
  1058. DATA 0,0,0,0,0
  1059. DATA 0,0,0,0,0
  1060. DATA 0,0,0,0,0
  1061. DATA 0,0,0,0,0
  1062. DATA 0,0,0,0,0
  1063. DATA 0,0,0,0,0
  1064. DATA 1,0,0,0,0
  1065. '47
  1066. DATA 0,0,0,0,0
  1067. DATA 0,0,0,0,1
  1068. DATA 0,0,0,1,0
  1069. DATA 0,0,1,0,0
  1070. DATA 0,1,0,0,0
  1071. DATA 1,0,0,0,0
  1072. DATA 0,0,0,0,0
  1073. '48
  1074. 'Numbers
  1075. DATA 0,1,1,1,0
  1076. DATA 1,0,0,0,1
  1077. DATA 1,0,0,0,1
  1078. DATA 1,0,0,0,1
  1079. DATA 1,0,0,0,1
  1080. DATA 1,0,0,0,1
  1081. DATA 0,1,1,1,0
  1082. '49
  1083. DATA 0,0,1,0,0
  1084. DATA 0,0,1,0,0
  1085. DATA 0,0,1,0,0
  1086. DATA 0,0,1,0,0
  1087. DATA 0,0,1,0,0
  1088. DATA 0,0,1,0,0
  1089. DATA 0,0,1,0,0
  1090. '50
  1091. DATA 0,1,1,1,0
  1092. DATA 1,0,0,0,1
  1093. DATA 0,0,0,1,0
  1094. DATA 0,0,1,0,0
  1095. DATA 0,1,0,0,0
  1096. DATA 1,0,0,0,0
  1097. DATA 1,1,1,1,1
  1098. '51
  1099. DATA 0,1,1,1,0
  1100. DATA 1,0,0,0,1
  1101. DATA 0,0,0,0,1
  1102. DATA 0,1,1,1,0
  1103. DATA 0,0,0,0,1
  1104. DATA 1,0,0,0,1
  1105. DATA 0,1,1,1,0
  1106. '52
  1107. DATA 1,0,0,0,1
  1108. DATA 1,0,0,0,1
  1109. DATA 1,0,0,0,1
  1110. DATA 0,1,1,1,1
  1111. DATA 0,0,0,0,1
  1112. DATA 0,0,0,0,1
  1113. DATA 0,0,0,0,1
  1114. '53
  1115. DATA 1,1,1,1,1
  1116. DATA 1,0,0,0,0
  1117. DATA 1,0,0,0,0
  1118. DATA 1,1,1,1,0
  1119. DATA 0,0,0,0,1
  1120. DATA 0,0,0,0,1
  1121. DATA 1,1,1,1,0
  1122. '54
  1123. DATA 1,0,0,0,0
  1124. DATA 1,0,0,0,0
  1125. DATA 1,0,0,0,0
  1126. DATA 1,1,1,1,0
  1127. DATA 1,0,0,0,1
  1128. DATA 1,0,0,0,1
  1129. DATA 0,1,1,1,0
  1130. '55
  1131. DATA 1,1,1,1,0
  1132. DATA 0,0,0,0,1
  1133. DATA 0,0,0,0,1
  1134. DATA 0,0,0,0,1
  1135. DATA 0,0,0,0,1
  1136. DATA 0,0,0,0,1
  1137. DATA 0,0,0,0,1
  1138. '56
  1139. DATA 0,1,1,1,0
  1140. DATA 1,0,0,0,1
  1141. DATA 1,0,0,0,1
  1142. DATA 0,1,1,1,0
  1143. DATA 1,0,0,0,1
  1144. DATA 1,0,0,0,1
  1145. DATA 0,1,1,1,0
  1146. '57
  1147. DATA 0,1,1,1,0
  1148. DATA 1,0,0,0,1
  1149. DATA 1,0,0,0,1
  1150. DATA 0,1,1,1,1
  1151. DATA 0,0,0,0,1
  1152. DATA 0,0,0,0,1
  1153. DATA 0,0,0,0,1
  1154. '58
  1155. DATA 0,0,0,0,0
  1156. DATA 0,0,1,0,0
  1157. DATA 0,0,0,0,0
  1158. DATA 0,0,0,0,0
  1159. DATA 0,0,0,0,0
  1160. DATA 0,0,1,0,0
  1161. DATA 0,0,0,0,0
  1162. '59
  1163. DATA 0,0,0,0,0
  1164. DATA 0,0,1,0,0
  1165. DATA 0,0,0,0,0
  1166. DATA 0,0,0,0,0
  1167. DATA 0,0,0,0,0
  1168. DATA 0,0,1,0,0
  1169. DATA 0,1,0,0,0
  1170. '60
  1171. DATA 0,0,0,0,0
  1172. DATA 0,0,0,1,0
  1173. DATA 0,0,1,0,0
  1174. DATA 0,1,0,0,0
  1175. DATA 0,0,1,0,0
  1176. DATA 0,0,0,1,0
  1177. DATA 0,0,0,0,0
  1178. '61
  1179. DATA 0,0,0,0,0
  1180. DATA 0,0,0,0,0
  1181. DATA 1,1,1,1,1
  1182. DATA 0,0,0,0,0
  1183. DATA 1,1,1,1,1
  1184. DATA 0,0,0,0,0
  1185. DATA 0,0,0,0,0
  1186. '62
  1187. DATA 0,0,0,0,0
  1188. DATA 0,1,0,0,0
  1189. DATA 0,0,1,0,0
  1190. DATA 0,0,0,1,0
  1191. DATA 0,0,1,0,0
  1192. DATA 0,1,0,0,0
  1193. DATA 0,0,0,0,0
  1194. '63
  1195. DATA 0,1,1,1,0
  1196. DATA 1,0,0,0,1
  1197. DATA 0,0,0,0,1
  1198. DATA 0,0,0,1,0
  1199. DATA 0,0,1,0,0
  1200. DATA 0,0,0,0,0
  1201. DATA 0,0,1,0,0
  1202. '64
  1203. DATA 0,1,1,1,0
  1204. DATA 1,0,0,0,1
  1205. DATA 1,0,1,0,1
  1206. DATA 1,0,1,1,1
  1207. DATA 1,0,0,0,0
  1208. DATA 1,0,0,0,1
  1209. DATA 0,1,1,1,0
  1210. ' 65   Capitol
  1211. DATA 1,1,1,1,1
  1212. DATA 1,0,0,0,1
  1213. DATA 1,0,0,0,1
  1214. DATA 1,1,1,1,1
  1215. DATA 1,0,0,0,1
  1216. DATA 1,0,0,0,1
  1217. DATA 1,0,0,0,1
  1218. '66
  1219. DATA 1,1,1,1,0
  1220. DATA 1,0,0,0,1
  1221. DATA 1,0,0,0,1
  1222. DATA 1,1,1,1,0
  1223. DATA 1,0,0,0,1
  1224. DATA 1,0,0,0,1
  1225. DATA 1,1,1,1,0
  1226. '67
  1227. DATA 1,1,1,1,1
  1228. DATA 1,0,0,0,0
  1229. DATA 1,0,0,0,0
  1230. DATA 1,0,0,0,0
  1231. DATA 1,0,0,0,0
  1232. DATA 1,0,0,0,0
  1233. DATA 1,1,1,1,1
  1234. '68
  1235. DATA 1,1,1,1,0
  1236. DATA 1,0,0,0,1
  1237. DATA 1,0,0,0,1
  1238. DATA 1,0,0,0,1
  1239. DATA 1,0,0,0,1
  1240. DATA 1,0,0,0,1
  1241. DATA 1,1,1,1,0
  1242. '69
  1243. DATA 1,1,1,1,1
  1244. DATA 1,0,0,0,0
  1245. DATA 1,0,0,0,0
  1246. DATA 1,1,1,0,0
  1247. DATA 1,0,0,0,0
  1248. DATA 1,0,0,0,0
  1249. DATA 1,1,1,1,1
  1250. '70
  1251. DATA 1,1,1,1,1
  1252. DATA 1,0,0,0,0
  1253. DATA 1,0,0,0,0
  1254. DATA 1,1,1,0,0
  1255. DATA 1,0,0,0,0
  1256. DATA 1,0,0,0,0
  1257. DATA 1,0,0,0,0
  1258. '71
  1259. DATA 1,1,1,1,1
  1260. DATA 1,0,0,0,0
  1261. DATA 1,0,0,0,0
  1262. DATA 1,0,1,1,1
  1263. DATA 1,0,0,0,1
  1264. DATA 1,0,0,0,1
  1265. DATA 1,1,1,1,1
  1266. '72
  1267. DATA 1,0,0,0,1
  1268. DATA 1,0,0,0,1
  1269. DATA 1,0,0,0,1
  1270. DATA 1,1,1,1,1
  1271. DATA 1,0,0,0,1
  1272. DATA 1,0,0,0,1
  1273. DATA 1,0,0,0,1
  1274. '73
  1275. DATA 1,1,1,1,1
  1276. DATA 0,0,1,0,0
  1277. DATA 0,0,1,0,0
  1278. DATA 0,0,1,0,0
  1279. DATA 0,0,1,0,0
  1280. DATA 0,0,1,0,0
  1281. DATA 1,1,1,1,1
  1282. '74
  1283. DATA 0,0,0,0,1
  1284. DATA 0,0,0,0,1
  1285. DATA 0,0,0,0,1
  1286. DATA 0,0,0,0,1
  1287. DATA 1,0,0,0,1
  1288. DATA 1,0,0,0,1
  1289. DATA 1,1,1,1,1
  1290. '75
  1291. DATA 1,0,0,0,1
  1292. DATA 1,0,0,1,0
  1293. DATA 1,0,1,0,0
  1294. DATA 1,1,0,0,0
  1295. DATA 1,0,1,0,0
  1296. DATA 1,0,0,1,0
  1297. DATA 1,0,0,0,1
  1298. '76
  1299. DATA 1,0,0,0,0
  1300. DATA 1,0,0,0,0
  1301. DATA 1,0,0,0,0
  1302. DATA 1,0,0,0,0
  1303. DATA 1,0,0,0,0
  1304. DATA 1,0,0,0,0
  1305. DATA 1,1,1,1,1
  1306. '77
  1307. DATA 1,1,1,1,1
  1308. DATA 1,0,1,0,1
  1309. DATA 1,0,1,0,1
  1310. DATA 1,0,0,0,1
  1311. DATA 1,0,0,0,1
  1312. DATA 1,0,0,0,1
  1313. DATA 1,0,0,0,1
  1314. '78
  1315. DATA 1,1,1,1,1
  1316. DATA 1,0,0,0,1
  1317. DATA 1,0,0,0,1
  1318. DATA 1,0,0,0,1
  1319. DATA 1,0,0,0,1
  1320. DATA 1,0,0,0,1
  1321. DATA 1,0,0,0,1
  1322. '79
  1323. DATA 1,1,1,1,1
  1324. DATA 1,0,0,0,1
  1325. DATA 1,0,0,0,1
  1326. DATA 1,0,0,0,1
  1327. DATA 1,0,0,0,1
  1328. DATA 1,0,0,0,1
  1329. DATA 1,1,1,1,1
  1330. '80
  1331. DATA 1,1,1,1,1
  1332. DATA 1,0,0,0,1
  1333. DATA 1,0,0,0,1
  1334. DATA 1,1,1,1,1
  1335. DATA 1,0,0,0,0
  1336. DATA 1,0,0,0,0
  1337. DATA 1,0,0,0,0
  1338. '81
  1339. DATA 0,1,1,1,0
  1340. DATA 1,0,0,0,1
  1341. DATA 1,0,0,0,1
  1342. DATA 1,0,0,0,1
  1343. DATA 1,0,0,0,1
  1344. DATA 0,0,0,1,1
  1345. DATA 0,1,1,1,1
  1346. '82
  1347. DATA 1,1,1,1,1
  1348. DATA 1,0,0,0,1
  1349. DATA 1,0,0,0,1
  1350. DATA 1,1,1,1,1
  1351. DATA 1,1,0,0,0
  1352. DATA 1,0,1,0,0
  1353. DATA 1,0,0,1,1
  1354. '83
  1355. DATA 1,1,1,1,1
  1356. DATA 1,0,0,0,0
  1357. DATA 1,0,0,0,0
  1358. DATA 1,1,1,1,1
  1359. DATA 0,0,0,0,1
  1360. DATA 0,0,0,0,1
  1361. DATA 1,1,1,1,1
  1362. '84
  1363. DATA 1,1,1,1,1
  1364. DATA 0,0,1,0,0
  1365. DATA 0,0,1,0,0
  1366. DATA 0,0,1,0,0
  1367. DATA 0,0,1,0,0
  1368. DATA 0,0,1,0,0
  1369. DATA 0,0,1,0,0
  1370. '85
  1371. DATA 1,0,0,0,1
  1372. DATA 1,0,0,0,1
  1373. DATA 1,0,0,0,1
  1374. DATA 1,0,0,0,1
  1375. DATA 1,0,0,0,1
  1376. DATA 1,0,0,0,1
  1377. DATA 1,1,1,1,1
  1378. '86
  1379. DATA 1,0,0,0,1
  1380. DATA 1,0,0,0,1
  1381. DATA 1,0,0,0,1
  1382. DATA 1,0,0,0,1
  1383. DATA 0,1,0,1,0
  1384. DATA 0,1,0,1,0
  1385. DATA 0,0,1,0,0
  1386. '87
  1387. DATA 1,0,0,0,1
  1388. DATA 1,0,0,0,1
  1389. DATA 1,0,0,0,1
  1390. DATA 1,0,0,0,1
  1391. DATA 1,0,1,0,1
  1392. DATA 1,0,1,0,1
  1393. DATA 1,1,1,1,1
  1394. '88
  1395. DATA 1,0,0,0,1
  1396. DATA 0,1,0,1,0
  1397. DATA 0,1,0,1,0
  1398. DATA 0,0,1,0,0
  1399. DATA 0,1,0,1,0
  1400. DATA 0,1,0,1,0
  1401. DATA 1,0,0,0,1
  1402. '89
  1403. DATA 1,0,0,0,1
  1404. DATA 1,0,0,0,1
  1405. DATA 0,1,0,1,0
  1406. DATA 0,0,1,0,0
  1407. DATA 0,0,1,0,0
  1408. DATA 0,0,1,0,0
  1409. DATA 0,0,1,0,0
  1410. '90
  1411. DATA 1,1,1,1,1
  1412. DATA 0,0,0,0,1
  1413. DATA 0,0,0,1,0
  1414. DATA 0,0,1,0,0
  1415. DATA 0,1,0,0,0
  1416. DATA 1,0,0,0,0
  1417. DATA 1,1,1,1,1
  1418. '91
  1419. DATA 0,1,1,1,0
  1420. DATA 0,1,0,0,0
  1421. DATA 0,1,0,0,0
  1422. DATA 0,1,0,0,0
  1423. DATA 0,1,0,0,0
  1424. DATA 0,1,0,0,0
  1425. DATA 0,1,1,1,0
  1426. '92
  1427. DATA 0,0,0,0,0
  1428. DATA 1,0,0,0,0
  1429. DATA 0,1,0,0,0
  1430. DATA 0,0,1,0,0
  1431. DATA 0,0,0,1,0
  1432. DATA 0,0,0,0,1
  1433. DATA 0,0,0,0,0
  1434. '93
  1435. DATA 0,1,1,1,0
  1436. DATA 0,0,0,1,0
  1437. DATA 0,0,0,1,0
  1438. DATA 0,0,0,1,0
  1439. DATA 0,0,0,1,0
  1440. DATA 0,0,0,1,0
  1441. DATA 0,1,1,1,0
  1442. '94
  1443. DATA 0,0,1,0,0
  1444. DATA 0,1,0,1,0
  1445. DATA 0,0,0,0,0
  1446. DATA 0,0,0,0,0
  1447. DATA 0,0,0,0,0
  1448. DATA 0,0,0,0,0
  1449. DATA 0,0,0,0,0
  1450. '95
  1451. DATA 0,0,0,0,0
  1452. DATA 0,0,0,0,0
  1453. DATA 0,0,0,0,0
  1454. DATA 0,0,0,0,0
  1455. DATA 0,0,0,0,0
  1456. DATA 0,0,0,0,0
  1457. DATA 1,1,1,1,1
  1458. '96
  1459. DATA 0,0,1,0,0
  1460. DATA 0,0,0,1,0
  1461. DATA 0,0,0,0,0
  1462. DATA 0,0,0,0,0
  1463. DATA 0,0,0,0,0
  1464. DATA 0,0,0,0,0
  1465. DATA 0,0,0,0,0
  1466. '97
  1467. 'Lower case
  1468. DATA 0,0,0,0,0
  1469. DATA 0,0,0,0,0
  1470. DATA 1,1,1,1,1
  1471. DATA 1,0,0,0,1
  1472. DATA 1,1,1,1,1
  1473. DATA 1,0,0,0,1
  1474. DATA 1,0,0,0,1
  1475. '98
  1476. DATA 1,0,0,0,0
  1477. DATA 1,0,0,0,0
  1478. DATA 1,1,1,1,1
  1479. DATA 1,0,0,0,1
  1480. DATA 1,0,0,0,1
  1481. DATA 1,0,0,0,1
  1482. DATA 1,1,1,1,1
  1483. '99
  1484. DATA 0,0,0,0,0
  1485. DATA 0,0,0,0,0
  1486. DATA 1,1,1,1,1
  1487. DATA 1,0,0,0,0
  1488. DATA 1,0,0,0,0
  1489. DATA 1,0,0,0,0
  1490. DATA 1,1,1,1,1
  1491. '100
  1492. DATA 0,0,0,0,1
  1493. DATA 0,0,0,0,1
  1494. DATA 1,1,1,1,1
  1495. DATA 1,0,0,0,1
  1496. DATA 1,0,0,0,1
  1497. DATA 1,0,0,0,1
  1498. DATA 1,1,1,1,1
  1499. '101
  1500. DATA 0,0,0,0,0
  1501. DATA 0,0,0,0,0
  1502. DATA 1,1,1,1,1
  1503. DATA 1,0,0,0,1
  1504. DATA 1,1,1,1,1
  1505. DATA 1,0,0,0,0
  1506. DATA 1,1,1,1,1
  1507. '102
  1508. DATA 0,0,1,1,1
  1509. DATA 0,1,0,0,0
  1510. DATA 1,1,1,1,1
  1511. DATA 0,1,0,0,0
  1512. DATA 0,1,0,0,0
  1513. DATA 0,1,0,0,0
  1514. DATA 0,1,0,0,0
  1515. '103
  1516. DATA 1,1,1,1,1
  1517. DATA 1,0,0,0,1
  1518. DATA 1,0,0,0,1
  1519. DATA 1,0,0,0,1
  1520. DATA 1,1,1,1,1
  1521. DATA 0,0,0,0,1
  1522. DATA 1,1,1,1,1
  1523. '104
  1524. DATA 1,0,0,0,0
  1525. DATA 1,0,0,0,0
  1526. DATA 1,1,1,1,1
  1527. DATA 1,0,0,0,1
  1528. DATA 1,0,0,0,1
  1529. DATA 1,0,0,0,1
  1530. DATA 1,0,0,0,1
  1531. '105
  1532. DATA 1,0,0,0,0
  1533. DATA 0,0,0,0,0
  1534. DATA 1,0,0,0,0
  1535. DATA 1,0,0,0,0
  1536. DATA 1,0,0,0,0
  1537. DATA 1,0,0,0,0
  1538. DATA 1,0,0,0,0
  1539. '106
  1540. DATA 0,0,0,1,0
  1541. DATA 0,0,0,1,0
  1542. DATA 0,0,0,1,0
  1543. DATA 0,0,0,1,0
  1544. DATA 0,0,0,1,0
  1545. DATA 0,0,0,1,0
  1546. DATA 1,1,1,1,0
  1547. '107
  1548. DATA 1,0,0,0,0
  1549. DATA 1,0,0,0,0
  1550. DATA 1,0,0,0,1
  1551. DATA 1,0,0,1,0
  1552. DATA 1,1,1,0,0
  1553. DATA 1,0,0,1,0
  1554. DATA 1,0,0,0,1
  1555. '108
  1556. DATA 1,0,0,0,0
  1557. DATA 1,0,0,0,0
  1558. DATA 1,0,0,0,0
  1559. DATA 1,0,0,0,0
  1560. DATA 1,0,0,0,0
  1561. DATA 1,0,0,0,0
  1562. DATA 1,0,0,0,0
  1563. '109
  1564. DATA 0,0,0,0,0
  1565. DATA 0,0,0,0,0
  1566. DATA 1,1,1,1,1
  1567. DATA 1,0,1,0,1
  1568. DATA 1,0,0,0,1
  1569. DATA 1,0,0,0,1
  1570. DATA 1,0,0,0,1
  1571. '110
  1572. DATA 0,0,0,0,0
  1573. DATA 0,0,0,0,0
  1574. DATA 1,1,1,1,1
  1575. DATA 1,0,0,0,1
  1576. DATA 1,0,0,0,1
  1577. DATA 1,0,0,0,1
  1578. DATA 1,0,0,0,1
  1579. '111
  1580. DATA 0,0,0,0,0
  1581. DATA 0,0,0,0,0
  1582. DATA 1,1,1,1,1
  1583. DATA 1,0,0,0,1
  1584. DATA 1,0,0,0,1
  1585. DATA 1,0,0,0,1
  1586. DATA 1,1,1,1,1
  1587. '112
  1588. DATA 1,1,1,1,1
  1589. DATA 1,0,0,0,1
  1590. DATA 1,0,0,0,1
  1591. DATA 1,0,0,0,1
  1592. DATA 1,1,1,1,1
  1593. DATA 1,0,0,0,0
  1594. DATA 1,0,0,0,0
  1595. '113
  1596. DATA 1,1,1,1,1
  1597. DATA 1,0,0,0,1
  1598. DATA 1,0,0,0,1
  1599. DATA 1,0,0,0,1
  1600. DATA 1,1,1,1,1
  1601. DATA 0,0,0,0,1
  1602. DATA 0,0,0,0,1
  1603. '114
  1604. DATA 0,0,0,0,0
  1605. DATA 0,0,0,0,0
  1606. DATA 1,1,1,1,0
  1607. DATA 1,0,0,0,0
  1608. DATA 1,0,0,0,0
  1609. DATA 1,0,0,0,0
  1610. DATA 1,0,0,0,0
  1611. '115
  1612. DATA 0,0,0,0,0
  1613. DATA 0,0,0,0,0
  1614. DATA 1,1,1,1,1
  1615. DATA 1,0,0,0,0
  1616. DATA 1,1,1,1,1
  1617. DATA 0,0,0,0,1
  1618. DATA 1,1,1,1,1
  1619. '116
  1620. DATA 0,0,1,0,0
  1621. DATA 0,0,1,0,0
  1622. DATA 1,1,1,1,1
  1623. DATA 0,0,1,0,0
  1624. DATA 0,0,1,0,0
  1625. DATA 0,0,1,0,0
  1626. DATA 0,0,1,0,0
  1627. '117
  1628. DATA 0,0,0,0,0
  1629. DATA 0,0,0,0,0
  1630. DATA 1,0,0,0,1
  1631. DATA 1,0,0,0,1
  1632. DATA 1,0,0,0,1
  1633. DATA 1,0,0,0,1
  1634. DATA 1,1,1,1,1
  1635. '118
  1636. DATA 0,0,0,0,0
  1637. DATA 0,0,0,0,0
  1638. DATA 1,0,0,0,1
  1639. DATA 1,0,0,0,1
  1640. DATA 0,1,0,1,0
  1641. DATA 0,1,0,1,0
  1642. DATA 0,0,1,0,0
  1643. '119
  1644. DATA 0,0,0,0,0
  1645. DATA 0,0,0,0,0
  1646. DATA 1,0,0,0,1
  1647. DATA 1,0,0,0,1
  1648. DATA 1,0,0,0,1
  1649. DATA 1,0,1,0,1
  1650. DATA 1,1,1,1,1
  1651. '120
  1652. DATA 0,0,0,0,0
  1653. DATA 0,0,0,0,0
  1654. DATA 1,0,0,0,1
  1655. DATA 0,1,0,1,0
  1656. DATA 0,0,1,0,0
  1657. DATA 0,1,0,1,0
  1658. DATA 1,0,0,0,1
  1659. '121
  1660. DATA 1,0,0,0,1
  1661. DATA 1,0,0,0,1
  1662. DATA 1,0,0,0,1
  1663. DATA 1,1,1,1,1
  1664. DATA 0,0,0,0,1
  1665. DATA 0,0,0,0,1
  1666. DATA 1,1,1,1,1
  1667. '122
  1668. DATA 0,0,0,0,0
  1669. DATA 0,0,0,0,0
  1670. DATA 1,1,1,1,1
  1671. DATA 0,0,0,1,0
  1672. DATA 0,0,1,0,0
  1673. DATA 0,1,0,0,0
  1674. DATA 1,1,1,1,1
  1675. '123
  1676. DATA 0,0,1,0,0
  1677. DATA 0,1,0,0,0
  1678. DATA 0,1,0,0,0
  1679. DATA 1,0,0,0,0
  1680. DATA 0,1,0,0,0
  1681. DATA 0,1,0,0,0
  1682. DATA 0,0,1,0,0
  1683. '124
  1684. DATA 0,0,1,0,0
  1685. DATA 0,0,1,0,0
  1686. DATA 0,0,1,0,0
  1687. DATA 0,0,0,0,0
  1688. DATA 0,0,1,0,0
  1689. DATA 0,0,1,0,0
  1690. DATA 0,0,1,0,0
  1691. '125
  1692. DATA 0,0,1,0,0
  1693. DATA 0,0,0,1,0
  1694. DATA 0,0,0,1,0
  1695. DATA 0,0,0,0,1
  1696. DATA 0,0,0,1,0
  1697. DATA 0,0,0,1,0
  1698. DATA 0,0,1,0,0
  1699. '126
  1700. DATA 0,0,0,0,0
  1701. DATA 0,0,0,0,0
  1702. DATA 0,0,0,0,0
  1703. DATA 0,0,1,0,1
  1704. DATA 0,1,0,1,0
  1705. DATA 0,0,0,0,0
  1706. DATA 0,0,0,0,0
  1707. '127
  1708. DATA 0,0,0,0,0
  1709. DATA 0,0,0,0,0
  1710. DATA 0,0,0,0,0
  1711. DATA 0,0,1,0,0
  1712. DATA 0,1,0,1,0
  1713. DATA 1,0,0,0,1
  1714. DATA 1,1,1,1,1
  1715.  
  1716.  
  1717. '// data for cursor pointer in choseoptions
  1718.  
  1719. DATA 1,0,0,0,0,0
  1720. DATA 1,1,0,0,0,0
  1721. DATA 1,1,1,0,0,0
  1722. DATA 1,1,1,1,0,0
  1723. DATA 1,1,1,1,1,0
  1724. DATA 1,1,1,1,1,1
  1725. DATA 1,1,0,0,0,0
  1726. DATA 1,0,0,0,0,0
  1727.  
  1728.  
  1729.  
  1730. 'data to recontruct qbmatrix.scr in the event it is erased
  1731.  
  1732. DATA 1. ,04/11/94 ,Timothy Truman,       0,100
  1733. DATA 2. ,04/15/94 ,David Pastore,        0,100
  1734. DATA 3. ,04/25/94 ,John Matias,          0,100
  1735. DATA 4. ,04/15/94 ,Denise Eberts,        0,100
  1736. DATA 5. ,04/18/94 ,Mike,                 0, 50
  1737. DATA 6. ,04/18/94 ,Bonnie Soffan,        0, 50
  1738. DATA 7. ,04/19/94 ,Patty Effilo,         0, 50
  1739. DATA 8. ,04/11/94 ,Kelsi,                0, 45
  1740. DATA 9. ,04/21/94 ,Tracy,                0, 45
  1741. DATA 10.,04/21/94 ,Heather,              0, 45
  1742. DATA 11.,04/22/94 ,Pop Tart,             0, 30
  1743. DATA 12.,04/23/94 ,Muffin Man,           0, 30
  1744. DATA 13.,04/23/94 ,Cindy Bell,           0, 30
  1745. DATA 14.,04/23/94 ,John Smith,           0, 20
  1746. DATA 15.,04/25/94 ,Jane Doe,             0, 20
  1747.  
  1748. SUB BlankPal
  1749. OUT &H3C8, 0                'inform video card
  1750. FOR reg = 0 TO 144          'blank first 144 registers
  1751.   OUT &H3C9, 0              'send red component
  1752.   OUT &H3C9, 0              'send red component
  1753.   OUT &H3C9, 0              'send green comonent
  1754. NEXT
  1755. END SUB
  1756.  
  1757. SUB Button (x, y, opt, size, fill)
  1758.  
  1759. 'draws the shaded buttons on the options screen and load/save game screen.
  1760. Clearbuffer
  1761.  
  1762. offsety = 14
  1763.  
  1764. SELECT CASE (size)
  1765.  
  1766. CASE 0
  1767.   offsetx = 16
  1768. CASE 1
  1769.   offsetx = 66
  1770. CASE 2
  1771.   offsetx = 150
  1772. CASE 3
  1773.   offsetx = 66
  1774.   offsety = 34
  1775. CASE 4
  1776.   offsetx = 130
  1777.   offsety = 15
  1778. END SELECT
  1779.  
  1780.  
  1781. SELECT CASE (opt)
  1782.  
  1783. CASE 0
  1784.  
  1785.   LINE (x, y)-(x + offsetx, y), 24
  1786.   LINE (x + 2, y + 1)-(x + offsetx - 2, y + 1), 24
  1787.  
  1788.   LINE (x + offsetx, y)-(x + offsetx, y + offsety), 24
  1789.   LINE (x + offsetx - 1, y + 1)-(x + offsetx - 1, y + offsety - 2), 24
  1790.  
  1791.   LINE (x, y)-(x, y + offsety), 18
  1792.   LINE (x + 1, y + 1)-(x + 1, y + offsety - 1), 18
  1793.  
  1794.   LINE (x, y + offsety)-(x + offsetx, y + offsety), 18
  1795.   LINE (x + 1, y + offsety - 1)-(x + offsetx - 1, y + offsety - 1), 18
  1796.  
  1797. CASE 1
  1798.  
  1799.   LINE (x, y)-(x + offsetx, y), 18
  1800.   LINE (x + 2, y + 1)-(x + offsetx - 2, y + 1), 18
  1801.  
  1802.   LINE (x + offsetx, y)-(x + offsetx, y + offsety), 18
  1803.   LINE (x + offsetx - 1, y + 1)-(x + offsetx - 1, y + offsety - 2), 18
  1804.  
  1805.   LINE (x, y)-(x, y + offsety), 24
  1806.   LINE (x + 1, y + 1)-(x + 1, y + offsety - 1), 24
  1807.  
  1808.   LINE (x, y + offsety)-(x + offsetx, y + offsety), 24
  1809.   LINE (x + 1, y + offsety - 1)-(x + offsetx - 1, y + offsety - 1), 24
  1810.  
  1811. END SELECT
  1812.  
  1813. IF fill THEN LINE (x + 2, y + 2)-(x + offsetx - 2, y + offsety - 2), 126, BF
  1814.  
  1815.  
  1816.  
  1817. END SUB
  1818.  
  1819. SUB ChangePitPal
  1820.  
  1821. ' Changes pit color atribute each time it is called.
  1822. ' After ten times it recycles back to the first color.
  1823.  
  1824.  
  1825. STATIC initialize, colour
  1826.  
  1827. IF initialize = 0 THEN
  1828.   initialize = 1
  1829.   colour = levelnum
  1830.   IF colour > 9 THEN colour = 9
  1831. END IF
  1832.  
  1833. SELECT CASE colour
  1834.  
  1835. CASE 0                           ' grays (If using Matrix.pal)
  1836.   PALETTE 212, Colorvalue&(140)  ' highlight color
  1837.   PALETTE 204, Colorvalue&(132)  ' shade color
  1838.   PALETTE 208, Colorvalue&(136)  ' block color
  1839.  
  1840. CASE 1                           ' use the colors of piece 0
  1841.   PALETTE 212, Colorvalue&(7)    ' hc
  1842.   PALETTE 204, Colorvalue&(4)    ' sc
  1843.   PALETTE 208, Colorvalue&(6)    ' bc
  1844.                 
  1845. CASE 2                           ' use the colors of piece 1
  1846.   PALETTE 212, Colorvalue&(39)   ' hc
  1847.   PALETTE 204, Colorvalue&(34)   ' sc
  1848.   PALETTE 208, Colorvalue&(36)   ' bc
  1849.  
  1850. CASE 3                           ' use the colors of piece 2
  1851.   PALETTE 212, Colorvalue&(127)  ' hc
  1852.   PALETTE 204, Colorvalue&(122)  ' sc
  1853.   PALETTE 208, Colorvalue&(125)  ' bc
  1854.  
  1855. CASE 4                           ' use the colors of piece 3
  1856.   PALETTE 212, Colorvalue&(15)   ' hc
  1857.   PALETTE 204, Colorvalue&(12)   ' sc
  1858.   PALETTE 208, Colorvalue&(14)   ' bc
  1859.  
  1860. CASE 5                           ' use the colors of piece 4
  1861.   PALETTE 212, Colorvalue&(30)   ' hc
  1862.   PALETTE 204, Colorvalue&(25)   ' sc
  1863.   PALETTE 208, Colorvalue&(28)   ' bc
  1864.  
  1865. CASE 6                           ' use the colors of piece 5
  1866.   PALETTE 212, Colorvalue&(103)  ' hc
  1867.   PALETTE 204, Colorvalue&(100)  ' sc
  1868.   PALETTE 208, Colorvalue&(102)  ' bc
  1869.                          
  1870. CASE 7                           ' use the colors of piece 6
  1871.   PALETTE 212, Colorvalue&(48)   ' hc
  1872.   PALETTE 204, Colorvalue&(43)   ' sc
  1873.   PALETTE 208, Colorvalue&(45)   ' bc
  1874.  
  1875. CASE 8                           ' pink (If using Matrix.pal)
  1876.   PALETTE 212, Colorvalue&(63)   ' hc
  1877.   PALETTE 204, Colorvalue&(59)   ' sc
  1878.   PALETTE 208, Colorvalue&(61)   ' bc
  1879.  
  1880. CASE 9                           ' brown(If using Matrix.pal)
  1881.   PALETTE 212, Colorvalue&(55)   ' hc
  1882.   PALETTE 204, Colorvalue&(51)   ' sc
  1883.   PALETTE 208, Colorvalue&(53)   ' bc
  1884.     
  1885. END SELECT
  1886.  
  1887. colour = (colour + 1) MOD 10     ' increment the color
  1888.  
  1889.  
  1890. END SUB
  1891.  
  1892. SUB CheckForCleared
  1893.  
  1894.                     'store landing in grid grid array
  1895. FOR xmask = 0 TO 3                'left to right
  1896.   FOR ymask = 0 TO 3             'top to bottom
  1897.     offset = (playpiece * 4) + pieceorientation    'get offset for mask
  1898.     IF masks(offset, ymask, xmask) = 1 THEN          'Bit there ?
  1899.       gridx = (((xpiece + (xmask * blockwidth)) / blockwidth) - 1)
  1900.       gridy = (((ypiece + (ymask * blockheight))) / blockheight) - 5
  1901.       grid(gridy, gridx) = 1
  1902.     END IF
  1903.   NEXT
  1904. NEXT
  1905.  
  1906. Clearbuffer
  1907. CALL SoundFX(0)                             'make landing noise
  1908. Clearbuffer
  1909.  
  1910.                             'find complete rows
  1911. FOR ygrid = 0 TO 21                         'top to bottom
  1912.   FOR xgrid = 1 TO 10                       'left to right
  1913.     IF grid(ygrid, xgrid) = 1 THEN xcount = xcount + 1 'increment if occupied
  1914.       IF xcount = 10 THEN                     'complete row  ?
  1915.      numrows = numrows + 1                 'increment rowcount
  1916.      completerows(numrows) = ygrid         'store the row value for later
  1917.       END IF
  1918.     NEXT
  1919.     xcount = 0                                 'new row
  1920. NEXT
  1921.  
  1922. DIM word$(4, 10)                             'DIM array for text
  1923.                              'stuff arrays with text
  1924. word$(1, 1) = " ": word$(2, 1) = " ": word$(3, 1) = " ": word$(4, 1) = " ":
  1925. word$(1, 2) = " ": word$(2, 2) = " ": word$(3, 2) = " ": word$(4, 2) = " ":
  1926. word$(1, 3) = "S": word$(2, 3) = "D": word$(3, 3) = "T": word$(4, 3) = "M"
  1927. word$(1, 4) = "I": word$(2, 4) = "O": word$(3, 4) = "R": word$(4, 4) = "A"
  1928. word$(1, 5) = "N": word$(2, 5) = "U": word$(3, 5) = "I": word$(4, 5) = "T"
  1929. word$(1, 6) = "G": word$(2, 6) = "B": word$(3, 6) = "P": word$(4, 6) = "R"
  1930. word$(1, 7) = "L": word$(2, 7) = "L": word$(3, 7) = "L": word$(4, 7) = "I"
  1931. word$(1, 8) = "E": word$(2, 8) = "E": word$(3, 8) = "E": word$(4, 8) = "X"
  1932. word$(1, 9) = " ": word$(2, 9) = " ": word$(3, 9) = " ": word$(4, 9) = " ":
  1933. word$(1, 10) = " ": word$(2, 10) = " ": word$(3, 10) = " ": word$(4, 10) = " ":
  1934.  
  1935. DIM pit(10000)                              'DIM array to store pit
  1936. DIM image(43)                               'DIM array to store blocks
  1937.  
  1938. IF numrows THEN                             'found cleared rows  ?
  1939.   FOR columns = 1 TO 10                     'left to right
  1940.     FOR rows = 1 TO numrows                 'first row to last
  1941.       x = (columns + 1) * 11                 'calculate x screen position
  1942.       y = ((completerows(rows) + 5) * 7)     'calculate y screen positon
  1943.                             'GET whats there
  1944.       GET (x, y)-(x + blockwidth - 1, y + blockheight - 1), image
  1945.       PUT (x, y), image                      'PUT it back to erase
  1946.  
  1947.       SELECT CASE numrows                    'print charactor at cleared x
  1948.       CASE 1: ele$ = word$(1, letter)        'ditto
  1949.       CASE 2: ele$ = word$(2, letter)        'ditto
  1950.       CASE 3: ele$ = word$(3, letter)        'ditto
  1951.       CASE 4: ele$ = word$(4, letter)        'ditto
  1952.       END SELECT
  1953.       p5x7font x, y, ele$, 212             'ditto
  1954.     NEXT
  1955.     Stay (15)                               'slow down the action
  1956.     letter = letter + 1                     'increment for next charactor
  1957.   NEXT                                     'next row
  1958.   SoundFX (1)                              'make row clear noise
  1959. END IF
  1960.  
  1961.  
  1962.  
  1963.              'now erase the text and clear the row in the grid() array
  1964. FOR column = 1 TO 10                       'left to right
  1965.   x = (column + 1) * 11                    'calc x
  1966.   FOR row = 1 TO numrows                   'first cleared row to last
  1967.     posy = (completerows(row) + 5) * 7    'calc y
  1968.     GET (x, y)-(x + blockwidth - 1, y + blockheight - 1), image 'GET area
  1969.     PUT (x, y), image                     'PUT to erase
  1970.  NEXT
  1971. NEXT
  1972.  
  1973. 'graphicaly drop blocks above cleared rows down and sort grid array
  1974.  
  1975. FOR row = 1 TO numrows
  1976.   FOR ygrid = completerows(numrows) TO 1 STEP -1'count from cleared row up
  1977.     FOR xgrid = 1 TO 10                         'left to right
  1978.       grid(ygrid, xgrid) = grid(ygrid - 1, xgrid)  'drop rows in grid
  1979.     NEXT                                       'next column
  1980.   NEXT                                         'next row
  1981.  
  1982.   xget = (blockwidth) + Xpit                   'calc left side of pit
  1983.   xend = ((blockwidth + 1) * 10) + Xpit        'calc right side of pit
  1984.   ytoget = (completerows(row) * blockheight) + Ypit - 1  'calc bottom y
  1985.   ytodrop = (Ypit + blockheight)               'calc y drop
  1986.     
  1987.   GET (xget, Ypit)-(xend, ytoget), pit         'GET pit
  1988.   PUT (xget, Ypit), pit                        'PUT to erase
  1989.   PUT (xget, ytodrop), pit, PSET               'PUT to drop
  1990. NEXT
  1991.                  
  1992. IF numrows THEN
  1993.   SoundFX (0)                                     'make landing noise
  1994.   linescleared = linescleared + numrows           'add lines cleared
  1995.   SELECT CASE numrows                             'add line clear types
  1996.   CASE 1: sngle = sngle + 1                       'increment
  1997.   CASE 2: duble = duble + 1                       'ditto
  1998.   CASE 3: triple = triple + 1                     'ditto
  1999.   CASE 4: triple = triple + 1                     'ditto
  2000.   END SELECT
  2001. END IF
  2002.  
  2003. END SUB
  2004.  
  2005. FUNCTION CheckMove (mode)
  2006.  
  2007. ok = True                                            'assume piece can move
  2008.  
  2009. offset = (playpiece * 4) + pieceorientation          'calc offset
  2010.  
  2011. FOR xmask = 0 TO 3                                   'left to right
  2012.   FOR ymask = 0 TO 3                                 'top to bottom
  2013.     IF masks(offset, ymask, xmask) = 1 THEN          'bit there ?
  2014.  
  2015.       xgrid = ((xpiece + (xmask * blockwidth)) / blockwidth) - 1   'calc grid
  2016.       ygrid = ((ypiece + (ymask * blockheight)) / blockheight) - 5 'ditto
  2017.  
  2018.       SELECT CASE mode                                   'which direction  ?
  2019.       CASE right
  2020.     IF grid(ygrid, xgrid + 1) = 1 THEN ok = false   'look right
  2021.       CASE left
  2022.     IF grid(ygrid, xgrid - 1) = 1 THEN ok = false   'look left
  2023.       CASE down
  2024.     IF grid(ygrid + 1, xgrid) = 1 THEN ok = false 'look down
  2025.       END SELECT
  2026.     END IF
  2027.   NEXT
  2028. NEXT
  2029.  
  2030.  
  2031. CheckMove = ok
  2032.  
  2033. END FUNCTION
  2034.  
  2035. FUNCTION CheckRotate
  2036.  
  2037. ok = True                           'assume piece can be rotated
  2038.  
  2039. offset = (playpiece * 4) + pieceorientation            'calc offset
  2040.  
  2041. FOR xmask = 0 TO 3                                     'left to right
  2042.   FOR ymask = 0 TO 3                                   'top to bottom
  2043.     IF masks(offset, ymask, xmask) = 1 THEN
  2044.       xgrid = ((xpiece + (xmask * blockwidth)) / blockwidth) - 1
  2045.       ygrid = ((ypiece + (ymask * blockheight)) / blockheight) - 5
  2046.       IF grid(ygrid, xgrid) = 1 THEN ok = false
  2047.     END IF
  2048.   NEXT
  2049. NEXT
  2050.  
  2051. CheckRotate = ok
  2052.  
  2053. END FUNCTION
  2054.  
  2055. SUB Clearbuffer             'clear key buffer
  2056. DEF SEG = &H40              'point to low memory
  2057. POKE &H1A, PEEK(&H1C)       'point head to tail
  2058. END SUB
  2059.  
  2060. FUNCTION Colorvalue& (attribute)
  2061. ' returns color value of requested attribute
  2062. OUT &H3C7, attribute         ' Inform video card of request
  2063. red = INP(&H3C9)             ' get red component
  2064. grn = INP(&H3C9)             ' get green component
  2065. blu = INP(&H3C9)             ' get blue component
  2066. Colorvalue& = (65536 * blu) + (256 * grn) + red   ' Calculate color value
  2067.  
  2068. END FUNCTION
  2069.  
  2070. SUB DoFillPit
  2071.  
  2072.  
  2073. DIM holes(3)                            'dim array for hole values
  2074.  
  2075. endy = 22 - handicap                    'how far up the pit ?
  2076.  
  2077. FOR ygrid = 21 TO endy STEP -1          'start at bottom
  2078.   screeny = (ygrid + 5) * 7             'calc graphic coordinate
  2079.  
  2080.   FOR num = 0 TO 3
  2081.     holes(num) = (RND * 10) + 1         'generate hole values
  2082.   NEXT
  2083.  
  2084.   FOR xgrid = 1 TO 10                   'left to right
  2085.  
  2086.     nohole = True                      'reset flag
  2087.     FOR num = 0 TO 3                   'check for holes
  2088.       IF holes(num) = xgrid THEN nohole = false   'don't put a block
  2089.     NEXT
  2090.  
  2091.     IF nohole = True THEN
  2092.       screenx = (xgrid + 1) * 11                  'calc graphic coordinate
  2093.       PUT (screenx, screeny), blocks(77, 8) 'PUT block
  2094.       grid(ygrid, xgrid) = 1                  ' store value into grid array
  2095.    END IF
  2096.  
  2097.   NEXT xgrid
  2098. NEXT ygrid
  2099.  
  2100.  
  2101.  
  2102. END SUB
  2103.  
  2104. SUB DrawBlocks
  2105.  
  2106. DEFINT A-Z
  2107.  
  2108. REDIM blocks(77, 10)            ' need storage area
  2109.                          
  2110.                 ' start Drawing and storing blocks
  2111. DO
  2112.  
  2113.   row = 0
  2114.   Row2 = row + 7 - 1
  2115.   col = col + 15
  2116.   col2 = col + 11 - 1
  2117.  
  2118.   colour = colour + 1
  2119.  
  2120.   SELECT CASE (colour)
  2121.   CASE (1)                         ' reds
  2122.     bc = 6                         ' bc - block color
  2123.     sc = 4                         ' sc - shade color
  2124.     hc = 7                         ' hc - highlight color
  2125.  
  2126.   CASE (2)
  2127.     bc = 36: sc = 34: hc = 39      ' purples
  2128.     
  2129.   CASE (3)
  2130.     bc = 125: sc = 122: hc = 127    ' blues
  2131.             
  2132.   CASE (4)
  2133.     bc = 14: sc = 12: hc = 15       ' greens
  2134.            
  2135.   CASE (5)
  2136.     bc = 28: sc = 25: hc = 30       ' yellows
  2137.     
  2138.   CASE (6)
  2139.     bc = 102: sc = 100: hc = 103    ' light blues
  2140.  
  2141.   CASE (7)
  2142.     bc = 45: sc = 43: hc = 48       ' dark oranges
  2143.  
  2144.   CASE (8)
  2145.     bc = 136: sc = 132: hc = 140    ' grays
  2146.  
  2147.   CASE (9)
  2148.     bc = 208: sc = 204: hc = 212    ' color changing blocks
  2149.   END SELECT
  2150.  
  2151.   LINE (col, row)-(col2, Row2), bc, BF      ' draw block
  2152.   LINE (col, Row2)-(col2, Row2), sc         ' shade bottom
  2153.   LINE (col2, row)-(col2, Row2), hc         ' highlight right side
  2154.   LINE (col, row)-(col2, row), hc           ' higlight top
  2155.   LINE (col, row)-(col, Row2), sc           ' shade left side
  2156.                              
  2157.   GET (col, row)-(col2, Row2), blocks(77, colour)   ' store block
  2158.  
  2159.  
  2160.  LOOP UNTIL colour = 9
  2161.  
  2162.  
  2163. END SUB
  2164.  
  2165. SUB DrawPlayPiece (x, y, playpiece, pieceorientation)
  2166.  
  2167. ' Draws playpiece at x,y in position pieceorientation. If piece has stoped
  2168. ' traveling ,piecelanded will be true and playpiece will change color.
  2169.  
  2170.  
  2171. FOR xscan = 0 TO 3
  2172.  FOR yscan = 0 TO 3
  2173.     offset = (playpiece * 4) + pieceorientation
  2174.     IF masks(offset, yscan, xscan) = 1 THEN
  2175.       xpos = (xscan * blockwidth)
  2176.       ypos = (yscan * blockheight)
  2177.       IF piecelanded THEN
  2178.     PUT (xpos + x, ypos + y), blocks(77, playpiece + 1)
  2179.     PUT (xpos + x, ypos + y), blocks(77, 9)
  2180.       ELSE
  2181.     PUT (xpos + x, ypos + y), blocks(77, playpiece + 1)
  2182.       END IF
  2183.     END IF
  2184.  NEXT
  2185. NEXT
  2186.  
  2187. END SUB
  2188.  
  2189. SUB DrawPlayScreen
  2190.  
  2191.  
  2192.  
  2193.                          ' border
  2194. PUT (11, 0), blocks(77, 3)                 ' top left corner
  2195. FOR backx = 22 TO 294 STEP 11              ' top line
  2196.     PUT (backx, 0), blocks(77, 3)
  2197. NEXT
  2198. PUT (backx, 0), blocks(77, 3)              ' top Right Corner
  2199.  
  2200. FOR backy = 7 TO 183 STEP 7
  2201.     PUT (backx, backy), blocks(77, 3)        ' right side
  2202. NEXT
  2203. PUT (backx, backy), blocks(77, 3)          ' bottom right corner
  2204. FOR backx = 286 TO 22 STEP -11             ' right bottom
  2205.     PUT (backx, backy), blocks(77, 3)
  2206. NEXT
  2207. PUT (backx, backy), blocks(77, 3)          ' bottom left corner
  2208. FOR backy = 7 TO 184 STEP 7
  2209.     PUT (backx, backy), blocks(77, 3)        ' left side
  2210. NEXT
  2211.  
  2212. LINE (132, 48)-(296, 188), 121, BF
  2213. LINE (132, 48)-(132, 188), 122
  2214. LINE (200, 100)-(296, 100), 125
  2215. LINE (132, 100)-(132, 188), 125
  2216.  
  2217. p5x7font 140, 95, "Statistics", 74
  2218. LINE (132, 93)-(200, 105), 125, B
  2219. LINE (132, 48)-(296, 48), 125
  2220. LINE (132, 93)-(132, 48), 125
  2221. LINE (230, 48)-(230, 100), 125
  2222. LINE (230, 60)-(296, 60), 125
  2223.  
  2224. GetHighScores (1)
  2225.  
  2226. p5x7font 136, 50, "Score", 68
  2227. p5x7font 170, 50, "0", 69
  2228. p5x7font 136, 65, "HighScore", 70
  2229. p5x7font 190, 65, oldhigh$, 71
  2230. p5x7font 136, 80, "Lines", 72
  2231. p5x7font 166, 80, "0", 68
  2232.  
  2233. p5x7font 234, 62, "Insert", 76
  2234. IF slammode THEN
  2235.     p5x7font 274, 62, "On", 15
  2236. ELSE
  2237.     p5x7font 274, 62, "Off", 7
  2238. END IF
  2239.  
  2240. p5x7font 235, 75, "Sound", 79
  2241. IF soundmode THEN
  2242.     p5x7font 275, 75, "On", 81
  2243. ELSE
  2244.     p5x7font 275, 75, "Off", 80
  2245. END IF
  2246.  
  2247. p5x7font 240, 49, "Messages", 74
  2248. p5x7font 22, 6, "Next", 65
  2249. levelnum$ = LTRIM$(STR$(levelnum))
  2250. p5x7font 111, 14, levelnum$, 67
  2251. p5x7font 99, 6, "Level", 66
  2252. p5x7font 250, 110, "Singles", 84
  2253. p5x7font 250, 130, "Doubles", 86
  2254. p5x7font 250, 150, "Triples", 88
  2255. p5x7font 250, 170, "Matrixs", 90
  2256.  
  2257.  
  2258. END SUB
  2259.  
  2260. SUB EndGame
  2261.  
  2262. SoundFX 4
  2263. LINE (44, 57)-(109, 84), 21, BF               'make a plate
  2264. LINE (44, 57)-(109, 84), 23, B                'ditto
  2265. p5x7font 49, 66, "GAME OVER", 140             'let em know what happened
  2266. DO: LOOP UNTIL ReturnEvent                    'wait for a keypress
  2267. GetHighScores (0)                             'display highscores
  2268. RUN                                           'restart Matrix
  2269. END
  2270.  
  2271. END SUB
  2272.  
  2273. SUB EndToQBasic
  2274.  
  2275.  
  2276. x1 = 105: x2 = 210: y1 = 50: y2 = 115     'define box
  2277.  
  2278. GetArea x1, y1, x2, y2, 0                 'save area
  2279.  
  2280. LINE (x1, y1)-(x2, y2), 29, BF            'draw box
  2281. LINE (x1, y1)-(x2, y2), 26, B             'ditto
  2282.  
  2283. p5x7font 120, 67, "Exit to Qbasic", 32       'print text
  2284. p5x7font 120, 68, "Exit to Qbasic", 0       'print text
  2285.  
  2286. p5x7font 127, 79, "   (Y/N)   ", 32          'ditto
  2287. p5x7font 127, 78, "   (Y/N)   ", 0          'ditto
  2288.  
  2289. p5x7font 127, 89, " (R)estart ", 32          'ditto
  2290. p5x7font 127, 88, " (R)estart ", 0          'ditto
  2291.  
  2292. DO                                        'input loop
  2293.  
  2294.  a$ = INKEY$                              'get key press
  2295.  SELECT CASE a$                           'process it
  2296.  CASE "Y", "y": END
  2297.  CASE "N", "n": EXIT DO
  2298.  CASE "R", "r": RUN
  2299.  END SELECT
  2300.  
  2301. LOOP
  2302.  
  2303. GetArea x1, y1, x2, y2, 1                 'restore screen
  2304.                  
  2305. END SUB
  2306.  
  2307. SUB GetArea (ax, ay, bx, by, replace)
  2308.  
  2309. STATIC x, y, stor()
  2310.  
  2311. IF replace = 0 THEN
  2312.   size1 = ax - bx
  2313.   size2 = ay - by
  2314.   totalsize = size1 * size2
  2315.   REDIM stor(totalsize)
  2316.   GET (ax, ay)-(bx, by), stor
  2317.   x = ax
  2318.   y = ay
  2319. ELSE
  2320.   PUT (x, y), stor, PSET
  2321.   ERASE stor
  2322. END IF
  2323.  
  2324. END SUB
  2325.  
  2326. SUB GetHighScores (mode)
  2327.  
  2328. DIM score(1 TO 16) AS highscores
  2329.  
  2330. filespec$ = "QBMATRIX.SCR"
  2331.  
  2332. OPEN filespec$ FOR RANDOM AS #1 LEN = 46            'open  file
  2333. FOR n = 1 TO 15                                     'first to last
  2334.     GET #1, n, score(n)                               'load it in
  2335. NEXT n                                              'next entry
  2336. CLOSE #1                                            'close the file
  2337.  
  2338. IF VAL(score(1).num) = 0 THEN                       'did file exist
  2339.      OPEN filespec$ FOR RANDOM AS #1 LEN = 46         'create file
  2340.      FOR n = 1 TO 15                                  'first to last
  2341.          READ a$, B$, c$, d$, e$                        'read in data
  2342.             score(n).rank = a$                            'store it
  2343.             score(n).dat = B$                             'ditto
  2344.             score(n).nam = c$                             'ditto
  2345.             score(n).lines = d$                             'ditto
  2346.             score(n).num = e$                             'ditto
  2347.          PUT #1, n, score(n)                            'write it
  2348.         NEXT n                                          'next entry
  2349.     CLOSE #1                                          'close file
  2350. END IF
  2351.  
  2352.  
  2353. SELECT CASE mode
  2354.  
  2355. CASE 0
  2356.  
  2357.  Temp$ = LTRIM$(STR$(gamescore&))                    'convert to clean string
  2358.  addpad = 6 - LEN(Temp$)                             'calc padding
  2359.  gamescor$ = Temp$ + STRING$(addpad, 32)             'add it
  2360.  
  2361.  FOR rank = 1 TO 15                                  'find players rank
  2362.  
  2363.      IF gamescore& > VAL(score(rank).num) THEN         'make the list ?
  2364.  
  2365.          FOR bump = 14 TO rank STEP -1                   'sort it
  2366.     score(bump + 1).dat = score(bump).dat        'bump ahead
  2367.     score(bump + 1).nam = score(bump).nam        'ditto
  2368.     score(bump + 1).lines = score(bump).lines        'ditto
  2369.     score(bump + 1).num = score(bump).num        'ditto
  2370.          NEXT                                            'bump next
  2371.          month$ = MID$(DATE$, 1, 2)                      'get month
  2372.          day$ = MID$(DATE$, 4, 2)                        'get day
  2373.          year$ = MID$(DATE$, 9, 2)                       'get year
  2374.          format$ = month$ + "/" + day$ + "/" + year$     'format the date
  2375.          score(rank).dat = format$                       'store it
  2376.          score(rank).lines = LTRIM$(STR$(linescleared))  'store it
  2377.          score(rank).num = gamescor$                     'store gamescore
  2378.          score(rank).nam = ""
  2379.          ShowHighScores score(), 1                       'print the list
  2380.          y = (rank * 10) + 26                            'calc y
  2381.          score(rank).nam = InputText$(93, y, 24)         'enter name
  2382.          OPEN filespec$ FOR RANDOM AS #1 LEN = 46        'open file
  2383.          FOR n = 1 TO 15                                 'first to last
  2384.              PUT #1, n, score(n)                           'write entry
  2385.          NEXT                                            'next entry
  2386.          CLOSE #1                                        'close file
  2387.          EXIT FOR                                        'all done
  2388.      END IF
  2389.     NEXT
  2390.  
  2391. CASE 1                                               'return highscore
  2392.     oldhigh$ = score(1).num
  2393. CASE 2
  2394.     ShowHighScores score(), 0                          'print the list
  2395. END SELECT
  2396.  
  2397.  
  2398.  
  2399. END SUB
  2400.  
  2401. SUB GetOptions
  2402.  
  2403. xmin = 20                              'set cursor limits
  2404. ymin = 20
  2405. xmax = 300
  2406. ymax = 190
  2407.  
  2408. CLS
  2409.  
  2410. LINE (11, 7)-(307, 188), 124, BF      'make a background plate
  2411.  
  2412. TileScreen (0)
  2413.  
  2414.                      
  2415.                          'ini buttons
  2416. Button 35, 24, 0, 1, 1               'quick drop
  2417. Button 35, 44, 0, 1, 1               'ditto
  2418. Button 219, 24, 0, 1, 1              'sound mode
  2419. Button 219, 44, 0, 1, 1              'ditto
  2420. Button 126, 24, 0, 3, 1              'Play matrix
  2421.                          
  2422.                             ' print headers
  2423. p5x7font 140, 10, "Options", 95
  2424. p5x7font 149, 32, "Play", 0
  2425. p5x7font 135, 43, "QB Matrix", 0
  2426. p5x7font 150, 31, "Play", 84
  2427. p5x7font 136, 42, "QB Matrix", 84
  2428. p5x7font 145, 62, "Level", 96
  2429. p5x7font 136, 92, "Handicap", 96
  2430. p5x7font 48, 28, "Slam on", 96
  2431. p5x7font 48, 48, "Slam off", 96
  2432. p5x7font 216, 28, "  Sound On", 96
  2433. p5x7font 214, 48, "  Sound Off", 96
  2434.  
  2435. p5x7font 14, 148, " Use Arrow keys or numeric key pad to move cursor.", 96
  2436. p5x7font 32, 158, " Press space bar or 5 key to press buttons.", 96
  2437.  
  2438.  
  2439. x = 45                                         'level number buttons
  2440. FOR n = 0 TO 9
  2441.   Button x - 5, 74, 0, 0, 1
  2442.   p5x7font x, 77, CHR$(n + 48), 96
  2443.   x = x + 25
  2444. NEXT n
  2445.  
  2446. x = 45                                         'number handicap buttons
  2447. FOR n = 0 TO 9
  2448.   Button x - 5, 104, 0, 0, 1
  2449.   p5x7font x, 107, CHR$(n + 48), 96
  2450.   x = x + 25
  2451. NEXT n
  2452.  
  2453.                                  'set previous options
  2454. xbut = (levelnum * 25) + 40                    'calc button
  2455. Button xbut, 74, 1, 0, 0                       'push it in
  2456. xbut = (handicap * 25) + 40                    'calc button
  2457. Button xbut, 104, 1, 0, 0                      'push it in
  2458.  
  2459.  
  2460. IF slammode THEN                      'Set slammode
  2461.   Button 35, 24, 1, 1, 0
  2462. ELSE
  2463.   Button 35, 44, 1, 1, 0
  2464. END IF
  2465.  
  2466. IF soundmode THEN                       'set sound
  2467.   Button 219, 24, 1, 1, 0               'push button
  2468. ELSE                                    'sound off
  2469.   Button 219, 44, 1, 1, 0               'push button
  2470. END IF
  2471.  
  2472.  
  2473.  
  2474. PALETTE 255, (65536 * 0) + (256 * 0) + 60      'define cusor
  2475. curwidth = 6                                   'ditto
  2476. curheight = 8                                  'ditto
  2477. DIM cursor(1 TO curwidth, 1 TO curheight)      'dim array
  2478. FOR y = 1 TO curheight                         'top to bottom
  2479.   FOR x = 1 TO curwidth                        'left to right
  2480.    READ dat                                    'read data
  2481.     cursor(x, y) = dat                         'store to array
  2482.    NEXT
  2483. NEXT
  2484.  
  2485.  
  2486. xcur = 160: ycur = 40                                      'set position
  2487.  
  2488. bytes = ((xcur + curwidth) * (ycur + curheight)) / 2 + 2   'calc bytes
  2489. DIM background(bytes)                                  'to restore background
  2490.  
  2491.  
  2492.  
  2493. DO                                                        ' input loop
  2494.  
  2495.  
  2496.    GET (xcur, ycur)-(xcur + curwidth, ycur + curheight), background
  2497.  
  2498.    FOR y = 1 TO curheight
  2499.     FOR x = 1 TO curwidth                             'Draw cursor
  2500.      IF cursor(x, y) = 1 THEN PSET (xcur + x, ycur + y), 255
  2501.     NEXT
  2502.    NEXT
  2503.  
  2504.      DO
  2505.        event = ReturnEvent
  2506.        red = red + 1: IF red > 63 THEN red = 10          'strobe cursor
  2507.        PALETTE 255, (65536 * blu) + (256 * grn) + red    'ditto
  2508.      LOOP UNTIL event
  2509.     
  2510.      PUT (xcur, ycur), background, PSET
  2511.  
  2512.  
  2513.      SELECT CASE event
  2514.                              'process events
  2515.      CASE Esc
  2516.             EndToQBasic
  2517.      CASE up, Eight
  2518.        IF ycur > ymin THEN ycur = ycur - 6
  2519.      CASE down, two
  2520.        IF ycur < ymax THEN ycur = ycur + 6
  2521.      CASE left, Four
  2522.        IF xcur > xmin THEN xcur = xcur - 6
  2523.      CASE right, Six
  2524.        IF xcur < xmax THEN xcur = xcur + 6
  2525.      CASE enter, space, five
  2526.          
  2527.        IF xcur >= 126 AND xcur <= 191 THEN
  2528.           SELECT CASE ycur
  2529.           CASE 25 TO 57                                    'Play Matrix
  2530.         OPEN "QBMATRIX.OPT" FOR OUTPUT AS #1          'open file
  2531.         WRITE #1, levelnum, handicap, slammode, soundmode  'save game options
  2532.         CLOSE #1                                   'close the file
  2533.         EXIT DO                                'leave options screen
  2534.           END SELECT
  2535.        END IF
  2536.         
  2537.       IF ycur >= 74 AND ycur <= 88 THEN          'level select
  2538.         IF xcur >= 40 AND xcur <= 280 THEN
  2539.           FOR x = 40 TO 265 STEP 25              'reset all buttons
  2540.         Button x, 74, 0, 0, 0
  2541.           NEXT
  2542.           xbut = (((xcur - 40) \ 25) * 25) + 40    'calc button
  2543.           Button xbut, 74, 1, 0, 0                'push it in
  2544.           levelnum = ((xcur - 40) \ 25)            'calc levelnum
  2545.           droptime! = (.5 / (levelnum + 1))  'calc new droptime
  2546.         END IF
  2547.       END IF
  2548.  
  2549.     
  2550.      IF ycur >= 104 AND ycur <= 118 THEN         'handicap select
  2551.        IF xcur >= 40 AND xcur <= 280 THEN
  2552.          FOR x = 40 TO 265 STEP 25               'reset all buttons
  2553.           Button x, 104, 0, 0, 0                 'pop 'em  out
  2554.          NEXT
  2555.          xbut = (((xcur - 40) \ 25) * 25) + 40   'calc button
  2556.          Button xbut, 104, 1, 0, 0               'push it in
  2557.          handicap = ((xcur - 40) \ 25)           'calc handicap
  2558.        END IF
  2559.      END IF
  2560.      
  2561.      IF xcur >= 35 AND xcur <= 102 THEN
  2562.        SELECT CASE ycur
  2563.        CASE 25 TO 38                        'slammode on
  2564.          slammode = -1                      'set slammode
  2565.          Button 35, 24, 1, 1, 0             'push button
  2566.          Button 35, 44, 0, 1, 0             'pop button
  2567.        CASE 44 TO 57                        'slammode off
  2568.          slammode = 0                       'set slammode
  2569.          Button 35, 44, 1, 1, 0             'push button
  2570.          Button 35, 24, 0, 1, 0             'pop button
  2571.        END SELECT
  2572.      END IF
  2573.  
  2574.  
  2575.      IF xcur >= 220 AND xcur <= 284 THEN
  2576.        SELECT CASE ycur
  2577.        CASE 25 TO 38                          'sound on
  2578.          soundmode = -1                       'set sound
  2579.          Button 219, 24, 1, 1, 0              'push button
  2580.          Button 219, 44, 0, 1, 0              'pop button
  2581.        CASE 44 TO 57                          'sound off
  2582.          soundmode = 0                        'set sound
  2583.          Button 219, 24, 0, 1, 0              'push button
  2584.          Button 219, 44, 1, 1, 0              'pop button
  2585.        END SELECT
  2586.      END IF
  2587.  
  2588.  
  2589.  
  2590.    SoundFX (0)
  2591.    Stay (30)
  2592.  
  2593.  END SELECT
  2594.  
  2595.  
  2596. LOOP
  2597.  
  2598. CLS
  2599.  
  2600.  
  2601. END SUB
  2602.  
  2603. FUNCTION GetPiece
  2604. 'Chooses and displayed next playpiece in upper left hand corner.
  2605.  
  2606. STATIC initialize, nextplaypiece
  2607.  
  2608.  
  2609. IF NOT initialize THEN
  2610.   playpiece = INT(RND * 7)
  2611.   nextplaypiece = INT(RND * 7)
  2612.   DrawPlayPiece 22, 14, nextplaypiece, 0
  2613.   initialize = NOT intialize
  2614. ELSE
  2615.   DrawPlayPiece 22, 14, nextplaypiece, 0      ' erase last piece
  2616.   playpiece = nextplaypiece
  2617.   nextplaypiece = INT(RND * 7)
  2618.   DrawPlayPiece 22, 14, nextplaypiece, 0      ' draw next piece
  2619. END IF
  2620.  
  2621. UpdatePieceMeter (0)
  2622.  
  2623. GetPiece = playpiece
  2624.  
  2625. END FUNCTION
  2626.  
  2627. FUNCTION InputText$ (xcur, ycur, length)
  2628.  
  2629.  
  2630. PALETTE 255, (65536 * 0) + (256 * 0) + 60  'define cursor color
  2631. DIM Edit$(length)                            'dim array to edit
  2632. ele = 1                                      'first element
  2633. DIM background(35, length + 2)
  2634. GET (xcur, ycur)-(xcur + 6, ycur + 8), background(35, 1)
  2635. p5x7font xcur, ycur, "_", 255              'init curser
  2636.  
  2637.  
  2638. Clearbuffer
  2639.  
  2640. DO
  2641.  
  2642.    DO                                                  'event loop
  2643.      event = ReturnEvent                               'anything happen ?
  2644.      IF dir = 0 THEN                                   'strobe cursor
  2645.        red = red + 1: IF red > 62 THEN dir = 1           'ditto
  2646.      ELSE                                              'ditto
  2647.        red = red - 1: IF red < 10 THEN dir = 0           'ditto
  2648.      END IF                                            'ditto
  2649.      PALETTE 255, (65536 * blu) + (256 * grn) + red    'ditto
  2650.    LOOP UNTIL event                                    'back for event
  2651.  
  2652.    SELECT CASE event
  2653.    CASE Esc: EXIT DO                          'do Esc
  2654.    CASE enter: EXIT DO                        'do enter
  2655.    CASE 1 TO 7, 9 TO 126                              'do regular keys
  2656.      event$ = CHR$(event)                     'convert for printing
  2657.      IF ele < length THEN                     'stay in bounds
  2658.        PUT (xcur, ycur), background(35, ele), PSET
  2659.        p5x7font xcur, ycur, CHR$(event), 144 'print font
  2660.        Edit$(ele) = event$                     'for backspace
  2661.        SELECT CASE event$                      'adjust kern
  2662.        CASE "i": xcur = xcur + 2               'ditto
  2663.        CASE "j": xcur = xcur + 5               'ditto
  2664.        CASE "l": xcur = xcur + 2               'ditto
  2665.        CASE "r": xcur = xcur + 5               'ditto
  2666.        CASE ".": xcur = xcur + 3               'ditto
  2667.        CASE "(": xcur = xcur + 3               'ditto
  2668.        CASE ")": xcur = xcur + 3               'ditto
  2669.        CASE "'": xcur = xcur + 2               'ditto
  2670.        CASE "!": xcur = xcur + 2               'ditto
  2671.        CASE ELSE: xcur = xcur + 6              'ditto
  2672.        END SELECT
  2673.        ele = ele + 1                           'adjust
  2674.        GET (xcur, ycur)-(xcur + 6, ycur + 8), background(35, ele)
  2675.        p5x7font xcur, ycur, "_", 255         'print cursor
  2676.      END IF
  2677.  
  2678.    CASE backspace, left                       'do backspace
  2679.      IF ele > 1 THEN
  2680.        PUT (xcur, ycur), background(35, ele), PSET
  2681.        ele = ele - 1   'adjust
  2682.        SELECT CASE (Edit$(ele))               'adjust kern
  2683.        CASE "i": xcur = xcur - 2              'ditto
  2684.        CASE "j": xcur = xcur - 5              'ditto
  2685.        CASE "l": xcur = xcur - 2              'ditto
  2686.        CASE "r": xcur = xcur - 5              'ditto
  2687.        CASE ".": xcur = xcur - 3              'ditto
  2688.        CASE "(": xcur = xcur - 3              'ditto
  2689.        CASE ")": xcur = xcur - 3              'ditto
  2690.        CASE "'": xcur = xcur - 2              'ditto
  2691.        CASE "!": xcur = xcur - 2              'ditto
  2692.        CASE ELSE: xcur = xcur - 6             'ditto
  2693.        END SELECT
  2694.        PUT (xcur, ycur), background(35, ele), PSET
  2695.        p5x7font xcur, ycur, "_", 255        'print cursor
  2696.        Edit$(ele) = CHR$(space)               'clear element
  2697.      END IF
  2698.   END SELECT
  2699. LOOP
  2700.  
  2701. FOR n = 1 TO length - 1                         'put elements into a string
  2702.  IF Edit$(n) = "" THEN Edit$(n) = CHR$(space)   'replace nulls
  2703.  Temp$ = Temp$ + Edit$(n)                       'create string
  2704. NEXT n
  2705.  
  2706. InputText$ = Temp$
  2707.  
  2708.  
  2709. END FUNCTION
  2710.  
  2711. SUB P3x5Num (x, y, num, colour)
  2712.  
  2713. Temp$ = LTRIM$(STR$(num))                   'convert number to string
  2714. length = LEN(Temp$)                         'get it's length
  2715.  
  2716. FOR ele = 1 TO length                       'print charactors in string
  2717.  offset = ASC(MID$(Temp$, ele, 1)) - 48  'extract charactor/calc array offset
  2718.  FOR ypos = 1 TO 5                                'top to bottom
  2719.    FOR xpos = 1 TO 3                              'left to right
  2720.      IF smallnum(offset, ypos, xpos) = 1 THEN     'set bits only
  2721.        PSET (x + xpos + xkern, y + ypos), colour  'PSET using colour
  2722.      END IF
  2723.    NEXT xpos
  2724.  NEXT ypos
  2725.  xkern = xkern + 4                         'adjust kern
  2726.  Clearbuffer                                'clear the buffer
  2727. NEXT ele
  2728.  
  2729. END SUB
  2730.  
  2731. SUB p5x7font (x, y, text$, colour)
  2732.  
  2733. length = LEN(text$)                    'get characters to print
  2734. IF length = 0 THEN EXIT SUB            'check length
  2735.  
  2736. FOR char = 0 TO length - 1             'print loop
  2737.  
  2738.    piece$ = MID$(text$, char + 1, 1)   'look at each piece of string
  2739.    aski = ASC(piece$)                  'assign it's ASCII value
  2740.  
  2741.    SELECT CASE (piece$)                 'adjust lower case
  2742.    CASE "g": kerny = kerny + 2         'ditto
  2743.    CASE "j": kerny = kerny + 2         'ditto
  2744.    CASE "p": kerny = kerny + 2         'ditto
  2745.    CASE "q": kerny = kerny + 2         'ditto
  2746.    CASE "y": kerny = kerny + 2         'ditto
  2747.    END SELECT
  2748.  
  2749.    FOR ybit = 0 TO 6                               'top to Bottom
  2750.      FOR xbit = 0 TO 4                              'left to right
  2751.        IF font(aski, xbit, ybit) = 1 THEN           'set true bits only
  2752.      PSET (x + xbit + kernx, y + ybit + kerny), colour   'PSET data
  2753.        END IF
  2754.      NEXT
  2755.    NEXT
  2756.  
  2757.    SELECT CASE (piece$)                'kern adjusment
  2758.    CASE "i": kernx = kernx + 2        'ditto
  2759.    CASE "j": kernx = kernx + 5        'ditto
  2760.    CASE "l": kernx = kernx + 2        'ditto
  2761.    CASE "r": kernx = kernx + 5        'ditto
  2762.    CASE ".": kernx = kernx + 3        'ditto
  2763.    CASE "(": kernx = kernx + 3        'ditto
  2764.    CASE ")": kernx = kernx + 3        'ditto
  2765.    CASE "'": kernx = kernx + 2        'ditto
  2766.    CASE "!": kernx = kernx + 2        'ditto
  2767.    CASE ELSE: kernx = kernx + 6       'ditto
  2768.    END SELECT
  2769.  
  2770.    kerny = 0                           'reset
  2771.  
  2772. NEXT
  2773.  
  2774.  
  2775. END SUB
  2776.  
  2777. SUB PauseGame
  2778.  
  2779. SoundFX 2
  2780. GetArea 242, 85, 292, 97, 0
  2781. p5x7font 242, 85, "Paused", 47
  2782. DO: LOOP UNTIL ReturnEvent
  2783. CALL GetArea(1, 1, 0, 0, 1)
  2784. Newcycle = false
  2785. SoundFX 3
  2786.  
  2787. END SUB
  2788.  
  2789. SUB RestorePal
  2790.     
  2791. DIM pal(256) AS hues                'DIM array for palette
  2792. DEF SEG = VARSEG(pal(0))            'point to it
  2793. BLOAD "QBMATRIX.PAL", 0             'load palette
  2794.  
  2795. OUT &H3C8, 0                        'inform video card
  2796. FOR c = 0 TO 255                    'load all registers
  2797.   OUT &H3C9, pal(c).red             'send red component
  2798.   OUT &H3C9, pal(c).grn             'send green component
  2799.   OUT &H3C9, pal(c).blu             'send blue component
  2800. NEXT
  2801.  
  2802. END SUB
  2803.  
  2804. FUNCTION ReturnEvent
  2805.  
  2806. kee$ = INKEY$                               'get key from buffer
  2807.     
  2808. IF kee$ <> "" THEN                          'key pressed ?
  2809.  IF LEN(kee$) = 1 THEN                      'whats the length ?
  2810.    keycode = ASC(kee$)                      'it's a regular key
  2811.  ELSE
  2812.    keycode = -ASC(RIGHT$(kee$, 1))          'it's an extented key
  2813.  END IF
  2814. END IF
  2815.  
  2816.  
  2817. ReturnEvent = keycode                       'return the event
  2818.  
  2819.  
  2820. END FUNCTION
  2821.  
  2822. SUB ShowHighScores (score() AS highscores, mode)
  2823.  
  2824.  
  2825. CLS
  2826.  
  2827. tile = (RND * 14) + 1                           'get a random tile
  2828. TileScreen (tile)                               'tile the screen
  2829.  
  2830. p5x7font 111, 17, "Matrix Hall of Fame", 0
  2831. p5x7font 110, 16, "Matrix Hall of Fame", 144
  2832.  
  2833. p5x7font 20, 25, "Rank                             Lines  Score", 0
  2834. p5x7font 20, 25, "Rank                             Lines  Score", 30
  2835.  
  2836. placey = 35
  2837. shadow = 1
  2838.  
  2839. FOR a = 1 TO 15
  2840.    p5x7font 22 + shadow, placey + shadow, score(a).rank, 0
  2841.    p5x7font 38 + shadow, placey + shadow, score(a).dat, 0
  2842.    p5x7font 93 + shadow, placey + shadow, score(a).nam, 0
  2843.    p5x7font 240 + shadow, placey + shadow, score(a).lines, 0
  2844.    p5x7font 268 + shadow, placey + shadow, score(a).num, 0
  2845.    p5x7font 22, placey, score(a).rank, 144
  2846.    p5x7font 38, placey, score(a).dat, 144
  2847.    p5x7font 93, placey, score(a).nam, 144
  2848.    p5x7font 240, placey, score(a).lines, 144
  2849.    p5x7font 268, placey, score(a).num, 144
  2850.    placey = placey + 10                       ' drop y to a new line
  2851. NEXT a
  2852.  
  2853. IF mode THEN EXIT SUB
  2854.  
  2855. DO
  2856.  
  2857. FOR x = 19 TO 419 STEP 5          ' highlights highscore entry
  2858.   FOR y = 35 TO 42
  2859.     FOR offsetx = 0 TO 10
  2860.       IF POINT(x + offsetx, y) = 144 THEN PSET (x + offsetx, y), 8
  2861.       IF ReturnEvent THEN EXIT DO
  2862.     NEXT
  2863.   NEXT
  2864.   Stay (40)
  2865.   FOR y = 35 TO 42
  2866.     FOR offsetx = 0 TO 10
  2867.      IF POINT(x + offsetx, y) = 8 THEN PSET (x + offsetx, y), 144
  2868.      IF ReturnEvent THEN EXIT DO
  2869.     NEXT
  2870.   NEXT
  2871. NEXT
  2872.  
  2873. LOOP UNTIL ReturnEvent
  2874.  
  2875.  
  2876. END SUB
  2877.  
  2878. DEFSNG A-Z
  2879. SUB SoundFX (fx%)
  2880.  
  2881. IF soundmode% = 0 THEN EXIT SUB
  2882.  
  2883.  
  2884. SELECT CASE fx%
  2885.  
  2886. CASE 0                            'landing hit
  2887.   frequency = 147
  2888.   FOR scale = 6 TO 1 STEP -1
  2889.     duration = scale / 100
  2890.     frequency = frequency + 47
  2891.     SOUND frequency, duration
  2892.   NEXT
  2893.  
  2894. CASE 1                             'Row clear
  2895.   FOR scale = 6 TO 1 STEP -1
  2896.     duration = scale / 10
  2897.     frequency = frequency + 100
  2898.     SOUND frequency, duration
  2899.   NEXT
  2900.   Stay (27)
  2901.   SOUND 700, .1
  2902.   SOUND 800, .2
  2903.   SOUND 900, .3
  2904.  
  2905. CASE 2                ' event leave noise
  2906.   SOUND 1000, .1
  2907.   Stay (210)
  2908.   SOUND 2000, .1
  2909.  
  2910. CASE 3                'event enter noise
  2911.   SOUND 2000, .1
  2912.   Stay (210)
  2913.   SOUND 1000, .1
  2914.  
  2915.  
  2916. CASE 4               'game end
  2917.  decay = 10
  2918.  duration = .1
  2919.  FOR freq = 500 TO 100 STEP -decay
  2920.    SOUND freq, duration
  2921.    Stay (20)
  2922.    Clearbuffer
  2923.  NEXT
  2924.  decay = 10
  2925.  duration! = .1
  2926.  FOR frequency = 500 TO 100 STEP -decay
  2927.    SOUND frequency, duration
  2928.    Stay (50)
  2929.    Clearbuffer
  2930.  NEXT
  2931.  
  2932. END SELECT
  2933.  
  2934. END SUB
  2935.  
  2936. SUB Stay (Millisecs)
  2937.  
  2938. STATIC syspeed&, Time2
  2939.  
  2940.  
  2941. IF syspeed& THEN                ' First time here -get relative system speed
  2942.  IF Millisecs THEN             ' Start Delay loop
  2943.              
  2944.    Factor& = (syspeed& * Millisecs) \ 55          'num of loops needed
  2945.           
  2946.    DO                                             ' delay loop
  2947.      Factor& = Factor& - 1                        ' Sub the num of loops
  2948.      LOOP UNTIL Time2 = PEEK(&H6C) OR Factor& = 0   ' make loop same as below
  2949.  
  2950.   END IF
  2951. ELSE                               ' Relative system speed processed here
  2952.   DEF SEG = &H40
  2953.   Time1 = PEEK(&H6C)
  2954.  
  2955.   DO
  2956.     Time2 = PEEK(&H6C)             ' get another
  2957.   LOOP UNTIL Time1 <> Time2        ' loop until new clock tick
  2958.  
  2959.   DO                               ' start here at new clock tick
  2960.     syspeed& = syspeed& - 1        ' Count the number of times looped
  2961.   LOOP UNTIL Time2 <> PEEK(&H6C) OR syspeed& = 0  'make same as loop above
  2962.   Time2 = 1255
  2963.   syspeed& = ABS(syspeed&)        'cant use this neg -reverse it
  2964.     
  2965. END IF
  2966.  
  2967.  
  2968.  
  2969. END SUB
  2970.  
  2971. DEFINT A-Z
  2972. SUB TileScreen (tile)
  2973. DIM buffer(141, 20)
  2974. DEF SEG = VARSEG(buffer(0, 0))
  2975. BLOAD "QBMATRIX.TL1", 0
  2976. FOR y = 0 TO 190 STEP 14
  2977.  FOR x = 0 TO 319 STEP 20
  2978.     PUT (x, y), buffer(141, tile), PSET
  2979.  NEXT
  2980. NEXT
  2981. END SUB
  2982.  
  2983. FUNCTION TimeToDrop
  2984.  
  2985. STATIC samp!
  2986.  
  2987. ok = false            'assume no drop
  2988.  
  2989. IF samp! = 0 THEN
  2990.   samp! = TIMER
  2991. ELSE
  2992.  IF ABS(TIMER - samp!) >= droptime! THEN
  2993.    ok = True
  2994.    samp! = 0
  2995.  END IF
  2996. END IF
  2997.  
  2998.  
  2999. TimeToDrop = ok
  3000.  
  3001.  
  3002. END FUNCTION
  3003.  
  3004. SUB TitleScreen
  3005.  
  3006. col = 18                                           'draw background
  3007. FOR x = 0 TO 320
  3008.     col = col + 1: IF col > 24 THEN col = 18
  3009.     x2 = 160
  3010.     y = 0
  3011.     y2 = 100
  3012.     LINE (x, y)-(x2, y2), col
  3013. NEXT
  3014.  
  3015. FOR x = 0 TO 320
  3016.  col = col + 1: IF col > 24 THEN col = 18
  3017.  x2 = 160
  3018.  y = 200
  3019.  y2 = 100
  3020.  LINE (x, y)-(x2, y2), col
  3021. NEXT
  3022.  
  3023. FOR y = 0 TO 200
  3024.     col = col + 1: IF col > 24 THEN col = 18
  3025.     x2 = 160
  3026.     x = 0
  3027.     y2 = 100
  3028.     LINE (x, y)-(x2, y2), col
  3029. NEXT
  3030.  
  3031. FOR y = 0 TO 200
  3032.  col = col + 1: IF col > 24 THEN col = 18
  3033.  x2 = 160
  3034.  x = 320
  3035.  y2 = 100
  3036.  LINE (x, y)-(x2, y2), col
  3037. NEXT
  3038.  
  3039.  
  3040. Clearbuffer                                  'clearkeybuffer
  3041.         
  3042. p5x7font 133, 50, "QB Matrix", 138              'shadow title
  3043. p5x7font 133, 51, "QB Matrix", 54              'print title
  3044.  
  3045.  
  3046.                          
  3047. p5x7font 57, 105, "Copyright ", 138               'shadow Copyright
  3048. CIRCLE (118, 110), 5, 138                      'ditto
  3049. CIRCLE (118, 110), 2, 138, 1, 5                'ditto
  3050. p5x7font 129, 106, "1996", 138                    'ditto
  3051. p5x7font 162, 106, "Nocturnal Creations", 138     'ditto
  3052.                             
  3053. p5x7font 58, 105, "Copyright ", 0             'print Copyright
  3054. CIRCLE (119, 110), 5, 0                    'ditto
  3055. CIRCLE (119, 110), 2, 0, 1, 5              'ditto
  3056. p5x7font 130, 106, "1996", 0                  'ditto
  3057. p5x7font 161, 106, "Nocturnal Creations", 0   'ditto
  3058.                     
  3059. p5x7font 96, 161, "Press any key to start.", 138   'ditto
  3060. p5x7font 96, 160, "Press any key to start.", 26   'ditto
  3061.                             
  3062. col! = 65536
  3063. var1 = 15
  3064. var2 = 30
  3065. var3 = 45
  3066. var4 = 62
  3067.  
  3068. DO                                         ' animate background
  3069.      
  3070.     PALETTE 18, var1 * col!
  3071.     IF CountForwards1 = 0 THEN
  3072.       var1 = var1 + 1
  3073.       IF var1 >= 62 THEN CountForwards1 = 1
  3074.     ELSE
  3075.       var1 = var1 - 1
  3076.       IF var1 <= 20 THEN CountForwards1 = 0
  3077.     END IF
  3078.  
  3079.     PALETTE 24, var2 * col!
  3080.     IF CountForwards2 = 0 THEN
  3081.       var2 = var2 + 1
  3082.       IF var2 >= 62 THEN CountForwards2 = 1
  3083.     ELSE
  3084.       var2 = var2 - 1
  3085.       IF var2 <= 20 THEN CountForwards2 = 0
  3086.     END IF
  3087.  
  3088.     PALETTE 21, var3 * col!
  3089.     IF CountForwards3 = 0 THEN
  3090.       var3 = var3 + 1
  3091.       IF var3 >= 62 THEN CountForwards3 = 1
  3092.     ELSE
  3093.       var3 = var3 - 1
  3094.       IF var3 <= 20 THEN CountForwards3 = 0
  3095.     END IF
  3096.  
  3097.     PALETTE 19, var4 * col!
  3098.     IF CountForwards4 = 0 THEN
  3099.       var4 = var4 + 1
  3100.       IF var4 >= 62 THEN CountForwards4 = 1
  3101.     ELSE
  3102.       var4 = var4 - 1
  3103.       IF var4 <= 20 THEN CountForwards4 = 0
  3104.     END IF
  3105.  
  3106.     PALETTE 22, var2 * col!
  3107.     PALETTE 23, var3 * col!
  3108.  
  3109.     event = ReturnEvent                            'check for events
  3110.  
  3111.     SELECT CASE event                              'process 'em
  3112.     CASE false                                     'absorb Nulls
  3113.     CASE Esc: EndToQBasic                          'end game
  3114.     CASE ELSE: RestorePal: EXIT DO                 'play game
  3115.  
  3116.     END SELECT
  3117.  
  3118. LOOP
  3119.  
  3120.                      
  3121.  
  3122. END SUB
  3123.  
  3124. SUB UpdatePieceMeter (mode)
  3125.  
  3126. STATIC bg1(), xm(), ym(), Total(), bg2(), xhigh
  3127.  
  3128. xstart = 145   'set start values
  3129. ystart = 110   'ditto
  3130. xlimit = 200   'limit travel
  3131.  
  3132.  
  3133. IF mode = -1 THEN
  3134.  DIM bg1(160, 7)        'To restore background behind pieces
  3135.  DIM bg2(105, 8)        'To restore background behind small numbers
  3136.  DIM xm(6)              'x placement
  3137.  DIM ym(6)              'y placement
  3138.  DIM Total(6)           'Total of each piece played
  3139.  
  3140.  FOR piece = 0 TO 6         'initialize all pieces
  3141.    xm(piece) = xstart        'set coordinates
  3142.    ym(piece) = ystart        'ditto
  3143.    ystart = ystart + 10      'adjust y
  3144.  
  3145. ' GET background info
  3146. GET (xm(piece), ym(piece))-(xm(piece) + 20, ym(piece) + 8), bg1(160, piece)
  3147. GET (xm(piece) + 24, ym(piece) + 2)-(xm(piece) + 36, ym(piece) + 8), bg2(105, piece)
  3148. GET (xm(piece) + 24, 180)-(xm(piece) + 41, 180 + 8), bg2(105, 7)
  3149.          
  3150.             
  3151.    FOR y = 1 TO 8                                'from top to bottom
  3152.      FOR x = 1 TO 20                              'left to right
  3153.        dat = meterpieces(piece, x, y)              'get data
  3154.        IF dat <> 0 THEN PSET (xm(piece) + x, ym(piece) + y), dat   'PSET data
  3155.      NEXT x                                       'next x
  3156.    NEXT y                                        'next y
  3157.  
  3158.    P3x5Num xm(piece) + 24, ym(piece) + 1, 0, 92  'print numbers
  3159.  
  3160.  NEXT piece                                     'next piece
  3161.                      
  3162. ELSE                                            'move meter bitmaps
  3163.  
  3164.  
  3165.                         'restore background
  3166.   PUT (xm(playpiece), ym(playpiece)), bg1(160, 0), PSET
  3167.   PUT ((xm(playpiece) + 24), ym(playpiece) + 2), bg2(105, 0), PSET
  3168.   PUT ((xhigh + 24), 180), bg2(105, 7), PSET
  3169.  
  3170.   Total(playpiece) = Total(playpiece) + 1       'increment piece total
  3171.  
  3172.   xm(playpiece) = xm(playpiece) + 1             'increment piece x value
  3173.   IF xm(playpiece) > xlimit THEN xm(playpiece) = xstart   'keep in bounds
  3174.                                  'print value
  3175.   P3x5Num xm(playpiece) + 24, ym(playpiece) + 1, Total(playpiece), 92
  3176.  
  3177.   FOR y = 1 TO 8                              'top to bottom
  3178.     FOR x = 1 TO 20                            'left to right
  3179.       dat = meterpieces(playpiece, x, y)       'get data
  3180.       IF dat <> 0 THEN PSET (xm(playpiece) + x, ym(playpiece) + y), dat
  3181.     NEXT x                                     'next x
  3182.   NEXT y                                      'next y
  3183.  
  3184. END IF
  3185.                             
  3186.  
  3187.      'Tally the number of pieces played and display the result.
  3188.      
  3189. FOR piece = 0 TO 6                            'count each piece
  3190.  piecetotal = piecetotal + Total(piece)      'add 'em up
  3191. NEXT                                          'next piece
  3192.  
  3193.     ' Find the piece with the highest value and use its x value
  3194.  
  3195. FOR piece = 0 TO 6                            'look at each piece
  3196.   xdata = xm(playpiece)                       'get it's x value
  3197.   IF xhigh < xdata THEN xhigh = xdata    'adjust xhigh
  3198. NEXT
  3199.  
  3200. P3x5Num xhigh + 24, 180, piecetotal, 93       'print total pieces played
  3201.  
  3202.  
  3203. END SUB
  3204.  
  3205. SUB Updatescore
  3206.  
  3207. Clearbuffer                                   'clear buffer
  3208.  
  3209. ygrid = -(((ypiece / blockheight) - 5) - 22)  'calc landing
  3210. mult = levelnum + 1                           'calc multiplier
  3211. points = (mult * mult) + (ygrid * mult)       'calc points
  3212. gamescore& = gamescore& + points              'add 'em
  3213.  
  3214.  
  3215. LINE (170, 50)-(207, 58), 121, BF             'erase old score
  3216. gamescore$ = LTRIM$(STR$(gamescore&))         'convert to string
  3217. p5x7font 170, 50, gamescore$, 69              'report
  3218.  
  3219.  
  3220. LINE (166, 80)-(202, 88), 121, BF              'erase old
  3221. linescleared$ = LTRIM$(STR$(linescleared))     'convert to a string
  3222. p5x7font 166, 80, linescleared$, 73            'report
  3223.  
  3224. LINE (267, 121)-(292, 128), 121, BF            'ditto
  3225. single$ = LTRIM$(STR$(sngle))
  3226. p5x7font 267, 121, single$, 86
  3227.  
  3228. LINE (267, 141)-(292, 148), 121, BF            'ditto
  3229. double$ = LTRIM$(STR$(duble))
  3230. p5x7font 267, 141, double$, 88
  3231.  
  3232. LINE (267, 161)-(292, 168), 121, BF            'ditto
  3233. triple$ = LTRIM$(STR$(triple))
  3234. p5x7font 267, 161, triple$, 90
  3235.  
  3236. LINE (267, 179)-(292, 188), 121, BF            'ditto
  3237. matrix$ = LTRIM$(STR$(matrix))
  3238. p5x7font 267, 179, matrix$, 92
  3239.  
  3240.                             
  3241.  
  3242. IF linescleared >= nextlevelmark THEN          'change level ?
  3243.   levelnum = levelnum + 1                     'increment level
  3244.   nextlevelmark = nextlevelmark + levelmark   'adjust next level marker
  3245.   IF levelnum < 10 THEN
  3246.     droptime! = droptime! - .05                'calc new droptime
  3247.   END IF
  3248.   ChangePitPal                                'change pit color
  3249.   levelnum$ = LTRIM$(STR$(levelnum))          'convert to a string
  3250.   LINE (111, 14)-(122, 21), 0, BF             'erase old
  3251.   p5x7font 111, 14, levelnum$, 67             'report new
  3252. END IF
  3253.  
  3254. Clearbuffer                                    'clear the keybuffer
  3255.  
  3256. END SUB
  3257.  
  3258.